|
361 | 361 | </antcall> |
362 | 362 | </target> |
363 | 363 |
|
364 | | - <target name="compile-core-native" depends="compile-core-classes" |
| 364 | + <target name="check-native-configure" if="compile.native"> |
| 365 | + <condition property="need.native.configure"> |
| 366 | + <not> <available file="${native.src.dir}/configure"/> </not> |
| 367 | + </condition> |
| 368 | + </target> |
| 369 | + |
| 370 | + <target name="create-native-configure" depends="check-native-configure" if="need.native.configure"> |
| 371 | + <mkdir dir="${native.src.dir}/config"/> |
| 372 | + <mkdir dir="${native.src.dir}/m4"/> |
| 373 | + <exec executable="autoreconf" dir="${native.src.dir}" |
| 374 | + searchpath="yes" failonerror="yes"> |
| 375 | + <arg value="-i"/> |
| 376 | + <arg value="-f"/> |
| 377 | + </exec> |
| 378 | + </target> |
| 379 | + |
| 380 | + <target name="check-native-makefile" if="compile.native"> |
| 381 | + <condition property="need.native.makefile"> |
| 382 | + <not> <available file="${native.src.dir}/Makefile"/> </not> |
| 383 | + </condition> |
| 384 | + </target> |
| 385 | + |
| 386 | + <target name="create-native-makefile" depends="check-native-makefile" if="need.native.makefile"> |
| 387 | + <antcall target="create-native-configure"/> |
| 388 | + <mkdir dir="${build.native}"/> |
| 389 | + <exec dir="${build.native}" executable="sh" failonerror="true"> |
| 390 | + <env key="OS_NAME" value="${os.name}"/> |
| 391 | + <env key="OS_ARCH" value="${os.arch}"/> |
| 392 | + <env key="JVM_DATA_MODEL" value="${sun.arch.data.model}"/> |
| 393 | + <env key="HADOOP_NATIVE_SRCDIR" value="${native.src.dir}"/> |
| 394 | + <arg line="${native.src.dir}/configure"/> |
| 395 | + </exec> |
| 396 | + </target> |
| 397 | + |
| 398 | + |
| 399 | + <target name="compile-core-native" depends="compile-core-classes,create-native-makefile" |
365 | 400 | if="compile.native"> |
366 | 401 |
|
367 | 402 | <mkdir dir="${build.native}/lib"/> |
|
405 | 440 | <class name="org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping" /> |
406 | 441 | </javah> |
407 | 442 |
|
408 | | - <exec dir="${build.native}" executable="sh" failonerror="true"> |
409 | | - <env key="OS_NAME" value="${os.name}"/> |
410 | | - <env key="OS_ARCH" value="${os.arch}"/> |
411 | | - <env key="JVM_DATA_MODEL" value="${sun.arch.data.model}"/> |
412 | | - <env key="HADOOP_NATIVE_SRCDIR" value="${native.src.dir}"/> |
413 | | - <arg line="${native.src.dir}/configure"/> |
414 | | - </exec> |
415 | | - |
416 | 443 | <exec dir="${build.native}" executable="${make.cmd}" failonerror="true"> |
417 | 444 | <env key="OS_NAME" value="${os.name}"/> |
418 | 445 | <env key="OS_ARCH" value="${os.arch}"/> |
|
1060 | 1087 | <!-- ================================================================== --> |
1061 | 1088 | <!-- --> |
1062 | 1089 | <!-- ================================================================== --> |
1063 | | - <target name="package" depends="compile, jar, javadoc, docs, api-report, jar-test" |
| 1090 | + <target name="package" depends="compile, jar, javadoc, docs, api-report, create-native-configure, jar-test" |
1064 | 1091 | description="Build distribution"> |
1065 | 1092 | <mkdir dir="${dist.dir}"/> |
1066 | 1093 | <mkdir dir="${dist.dir}/lib"/> |
|
1411 | 1438 | <exclude name="lib/jdiff/"/> |
1412 | 1439 | <exclude name="**/native/*"/> |
1413 | 1440 | <exclude name="**/native/config/*"/> |
| 1441 | + <exclude name="**/native/m4/*"/> |
1414 | 1442 | <exclude name="**/VERSION"/> |
1415 | 1443 | <exclude name="**/*.json"/> |
1416 | 1444 | <exclude name="**/hod/*.txt"/> |
|
0 commit comments