Author: nextgens
Date: 2006-01-05 12:55:43 +0000 (Thu, 05 Jan 2006)
New Revision: 7752

Removed:
   branches/bdb/ired/
Modified:
   branches/bdb/.classpath
   branches/bdb/build.xml
Log:
merging the new ant buildfile into the bdb branch

Modified: branches/bdb/.classpath
===================================================================
--- branches/bdb/.classpath     2006-01-05 12:55:03 UTC (rev 7751)
+++ branches/bdb/.classpath     2006-01-05 12:55:43 UTC (rev 7752)
@@ -2,6 +2,6 @@
 <classpath>
        <classpathentry 
excluding="test/**|org/spaceroots/mantissa/random/MersenneTwisterTest.java" 
kind="src" path="src"/>
        <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-       <classpathentry kind="lib" 
path="/usr/src/cvs/freenet-stable/lib/freenet-ext.jar"/>
+       <classpathentry kind="lib" path="lib/freenet-ext.jar"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>

Modified: branches/bdb/build.xml
===================================================================
--- branches/bdb/build.xml      2006-01-05 12:55:03 UTC (rev 7751)
+++ branches/bdb/build.xml      2006-01-05 12:55:43 UTC (rev 7752)
@@ -8,18 +8,36 @@
   </description>

   <!-- set global properties for this build -->
-  <property name="src" location="src"/>
-  <property name="build" location="build"/>
- 
+       <property name="src" location="src"/>
+       <property name="build" location="build"/>
+       <property name="lib"    location="lib"/>
+       <property name="freenet-ext.location" 
location="${lib}/freenet-ext.jar"/>
+<target name="env"      description="Learn about the environment">
+    <available file="${lib}/freenet-ext.jar" property="freenet-ext.present"/>
+</target>
+
+  <target name="get-extjar" unless="freenet-ext.present"
+    description="Download some external libraries which Freenet relies on">
+    <mkdir dir="${lib}"/>
+    <get src="http://downloads.freenetproject.org/alpha/freenet-ext.jar"; 
+                       dest="${freenet-ext.location}" 
+        verbose="true"
+        usetimestamp="true"/>
+               <property name="freenet-ext.present" value="true"/>
+  </target>
     <!-- ================================================== -->
-  <target name="compile">
+  <target name="compile" depends="get-extjar"  unless="freenet-ext.present">
     <!-- Create the time stamp -->
     <tstamp/>
     <!-- Create the build directory structure used by compile -->
     <mkdir dir="${build}"/>
+    <mkdir dir="${lib}"/>

 <!-- FIXME: remove the debug and replace with optimize -->
     <javac srcdir="${src}" destdir="${build}" debug="on" optimize="on" 
source="1.4">
+    <classpath>
+       <pathelement location="${lib}freenet-ext.jar"/>
+    </classpath>
 <!-- following a very temporary list of files to be build -->
       <include name="org/**/*.java"/>
       <include name="freenet/**/*.java"/>
@@ -35,7 +53,7 @@
     <!-- Create the distribution directory -->
     <!--<mkdir dir="."/>-->
     <!-- Put everything in ${build} into the freenet-${DSTAMP}.jar file -->
-    <jar jarfile="freenet-cvs-snapshot.jar" basedir="${build}">
+    <jar jarfile="freenet-cvs-snapshot.jar" basedir="${lib}">
       <manifest>
       <attribute name="Main-Class" value="freenet/node/Node"/>
          <attribute name="Built-By" value="${user.name}"/>
@@ -56,5 +74,10 @@
         <delete dir="${build}"/>
         <!--<delete><fileset dir="src" includes="**/*.class"/></delete>-->
     </target>
+    <target name="distclean" description="Delete class files and docs dir.">
+        <delete dir="${build}"/>
+        <delete dir="${lib}"/>
+        <!--<delete><fileset dir="src" includes="**/*.class"/></delete>-->
+    </target>

 </project>


Reply via email to