PageRenderTime 614ms CodeModel.GetById 24ms RepoModel.GetById 8ms app.codeStats 1ms

/tags/release-0.0.0-rc0/hive/external/odbc/build.xml

#
XML | 102 lines | 69 code | 13 blank | 20 comment | 0 complexity | fb964d3604b494f285aeb8ef654f7edc MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <project name="odbc" default="compile-cpp">
  17. <property name="src.dir" value="${basedir}/src"/>
  18. <!--
  19. Override properties defined in ../build-common.xml.
  20. -->
  21. <property name="test.junit.output.format" value="plain"/>
  22. <property name="test.output" value="false"/>
  23. <property name="test.junit.output.usefile" value="false"/>
  24. <property name="make.cmd" value="make"/>
  25. <import file="../build-common.xml"/>
  26. <path id="test.classpath">
  27. <pathelement location="${test.build.classes}" />
  28. <pathelement location="" />
  29. <pathelement location="${test.src.data.dir}/conf"/>
  30. <pathelement location="${hive.conf.dir}"/>
  31. <fileset dir="${test.src.data.dir}" includes="files/*.jar"/>
  32. <fileset dir="${hive.root}" includes="testlibs/*.jar"/>
  33. <pathelement location="${build.dir.hive}/ql/test/classes"/>
  34. <path refid="classpath"/>
  35. </path>
  36. <target name="check-word-size">
  37. <condition property="word.size" value="64" else="32">
  38. <contains string="${os.arch}" substring="64"/>
  39. </condition>
  40. </target>
  41. <target name="compile-cpp" depends="init,check-word-size">
  42. <exec dir="." executable="${make.cmd}" failonerror="true">
  43. <env key="WORD_SIZE" value="${word.size}"/>
  44. <env key="THRIFT_HOME" value="${thrift.home}"/>
  45. <env key="BOOST_HOME" value="${boost.home}"/>
  46. <env key="HIVE_ROOT" value="${hive.root}"/>
  47. <env key="BASE_DIR" value="${basedir}"/>
  48. </exec>
  49. <mkdir dir="${build.dir.hive}/odbc/include"/>
  50. <copy file="${basedir}/src/cpp/hiveclient.h" todir="${build.dir.hive}/odbc/include"/>
  51. <copy file="${basedir}/src/cpp/hiveconstants.h" todir="${build.dir.hive}/odbc/include"/>
  52. </target>
  53. <target name="clean">
  54. <delete dir="${build.dir.hive}/odbc/include"/>
  55. <exec dir="." executable="${make.cmd}" failonerror="true">
  56. <arg line="clean"/>
  57. <env key="HIVE_ROOT" value="${hive.root}"/>
  58. <env key="BASE_DIR" value="${basedir}"/>
  59. </exec>
  60. </target>
  61. <target name="install" depends="check-word-size">
  62. <exec dir="." executable="${make.cmd}" failonerror="true">
  63. <arg line="install"/>
  64. <env key="WORD_SIZE" value="${word.size}"/>
  65. <env key="THRIFT_HOME" value="${thrift.home}"/>
  66. <env key="HIVE_ROOT" value="${hive.root}"/>
  67. <env key="BASE_DIR" value="${basedir}"/>
  68. </exec>
  69. </target>
  70. <target name="uninstall">
  71. <exec dir="." executable="${make.cmd}" failonerror="true">
  72. <arg line="uninstall"/>
  73. <env key="HIVE_ROOT" value="${hive.root}"/>
  74. <env key="BASE_DIR" value="${basedir}"/>
  75. </exec>
  76. </target>
  77. <!-- Only run tests if thrift.home is defined so that we don't break other tests -->
  78. <target name="test" depends="check-word-size,check-thrift-home" if="thrift.home.defined">
  79. <exec dir="." executable="${make.cmd}" failonerror="true">
  80. <arg line="test"/>
  81. <env key="WORD_SIZE" value="${word.size}"/>
  82. <env key="THRIFT_HOME" value="${thrift.home}"/>
  83. <env key="HIVE_ROOT" value="${hive.root}"/>
  84. <env key="BASE_DIR" value="${basedir}"/>
  85. </exec>
  86. </target>
  87. </project>