Skip to content

Commit 6742bf5

Browse files
committed
HADOOP-6436. Remove auto-generated native build files. Contributed by Roman Shaposhnik
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1065858 13f79535-47bb-0310-9956-ffa450edef68
1 parent c23e691 commit 6742bf5

File tree

17 files changed

+43
-41695
lines changed

17 files changed

+43
-41695
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ Release 0.22.0 - Unreleased
275275
mapreduce.task.io.sort.factor, mapreduce.task.io.sort.mb
276276
(Chris Douglas via shv)
277277

278+
HADOOP-6436. Remove auto-generated native build files. (rvs via eli)
279+
278280
OPTIMIZATIONS
279281

280282
HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).

build.xml

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,42 @@
361361
</antcall>
362362
</target>
363363

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"
365400
if="compile.native">
366401

367402
<mkdir dir="${build.native}/lib"/>
@@ -405,14 +440,6 @@
405440
<class name="org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping" />
406441
</javah>
407442

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-
416443
<exec dir="${build.native}" executable="${make.cmd}" failonerror="true">
417444
<env key="OS_NAME" value="${os.name}"/>
418445
<env key="OS_ARCH" value="${os.arch}"/>
@@ -1060,7 +1087,7 @@
10601087
<!-- ================================================================== -->
10611088
<!-- -->
10621089
<!-- ================================================================== -->
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"
10641091
description="Build distribution">
10651092
<mkdir dir="${dist.dir}"/>
10661093
<mkdir dir="${dist.dir}/lib"/>
@@ -1411,6 +1438,7 @@
14111438
<exclude name="lib/jdiff/"/>
14121439
<exclude name="**/native/*"/>
14131440
<exclude name="**/native/config/*"/>
1441+
<exclude name="**/native/m4/*"/>
14141442
<exclude name="**/VERSION"/>
14151443
<exclude name="**/*.json"/>
14161444
<exclude name="**/hod/*.txt"/>

src/native/INSTALL

Lines changed: 0 additions & 236 deletions
This file was deleted.

src/native/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
# Export $(PLATFORM) to prevent proliferation of sub-shells
3232
export PLATFORM = $(shell echo $$OS_NAME | tr [A-Z] [a-z])
3333

34+
ACLOCAL_AMFLAGS = -I m4
3435
AM_CPPFLAGS = @JNI_CPPFLAGS@ -I$(HADOOP_NATIVE_SRCDIR)/src \
3536
-Isrc/org/apache/hadoop/io/compress/zlib \
3637
-Isrc/org/apache/hadoop/security \

0 commit comments

Comments
 (0)