--- build.xml.orig	2013-07-23 00:26:41.000000000 +0200
+++ build.xml	2013-10-29 16:27:54.000000000 +0100
@@ -452,7 +452,7 @@
   <!-- ====================================================== -->
   <!-- Compile the Java files                                 -->
   <!-- ====================================================== -->
-  <target name="record-parser" depends="init" if="javacc.home">
+  <target name="record-parser" if="javacc.home">
       <javacc
           target="${core.src.dir}/org/apache/hadoop/record/compiler/generated/rcc.jj"
           outputdirectory="${core.src.dir}/org/apache/hadoop/record/compiler/generated"
@@ -636,7 +636,7 @@
     </exec>
   </target>
 
-  <target name="compile-core-native" depends="create-native-configure, compile-core-classes"
+  <target name="compile-core-native"
           if="compile.native">
   	
     <mkdir dir="${build.native}/lib"/>
@@ -2042,7 +2042,7 @@
 <!-- librecordio targets.                                               -->
 <!-- ================================================================== -->		
 
-  <target name="compile-librecordio" depends="init" if="librecordio" >
+  <target name="compile-librecordio" if="librecordio" >
      <mkdir dir="${build.librecordio}"/>
      <exec dir="${librecordio.src}" executable="${make.cmd}" failonerror="true">
         <env key="XERCESCROOT" value="${xercescroot}"/>
@@ -2076,7 +2076,7 @@
     </chmod>
   </target>
  
-  <target name="create-c++-configure" depends="init" if="compile.c++">
+  <target name="create-c++-configure" if="compile.c++">
     <exec executable="autoreconf" dir="${c++.utils.src}" searchpath="yes" 
           failonerror="yes">
        <arg value="-if"/>
@@ -2099,7 +2099,7 @@
     </exec>
   </target>
 
-  <target name="check-c++-makefiles" depends="init" if="compile.c++">
+  <target name="check-c++-makefiles" if="compile.c++">
     <condition property="need.c++.utils.makefile">
        <not> <available file="${build.c++.utils}/Makefile"/> </not>
     </condition>
@@ -2120,7 +2120,7 @@
     </condition>
   </target>
 
-  <target name="check-c++-makefile-libhdfs" depends="init,check-c++-libhdfs" if="islibhdfs">
+  <target name="check-c++-makefile-libhdfs" depends="check-c++-libhdfs" if="islibhdfs">
     <condition property="need.c++.libhdfs.makefile">
        <not> <available file="${build.c++.libhdfs}/Makefile"/> </not>
     </condition>
@@ -2176,7 +2176,7 @@
   </target>
 
   <target name="compile-c++" 
-          depends="create-c++-configure,compile-c++-pipes"/>
+          depends="compile-c++-pipes"/>
 
   <target name="create-c++-examples-pipes-makefile" 
           depends="check-c++-makefiles" 
@@ -2824,5 +2824,23 @@
       <fileset file="${jsvc.install.dir}/jsvc.${os.arch}"/>
     </chmod>
  </target>
+  <target name="FreeBSD-dist" >
+    <mkdir dir="${dist.dir}"/>
+    <mkdir dir="${dist.dir}/lib"/>
+    <mkdir dir="${dist.dir}/contrib"/>
+    <mkdir dir="${dist.dir}/bin"/>
+
+    <copy todir="${dist.dir}/lib" includeEmptyDirs="false">
+      <fileset dir="lib">
+        <exclude name="**/native/**"/>
+      </fileset>
+    </copy>
 
+        <exec dir="${basedir}" executable="sh" failonerror="true">
+          <env key="BASE_NATIVE_LIB_DIR" value="${basedir}/lib/native"/>
+          <env key="BUILD_NATIVE_DIR" value="${build.dir}/native"/>
+          <env key="DIST_LIB_DIR" value="${basedir}/lib/native"/>
+          <arg line="${native.src.dir}/packageNativeHadoop.sh"/>
+    </exec>
+</target>
 </project>