Commits

Tim Vernum committed fc529ff

Cleanup build files

Comments (0)

Files changed (2)

convert/build.xml

         <!--
             <fileset dir="lib" />
         -->
-            <pathelement location="../parser/output/ant/classes" />
+            <pathelement location="../parser/output/ant/classes/parser" />
         </classpath>
     </javac>
   </target>
 
   <property name="javacc.home" value="/Users/tim/Development/Libraries/javacc/javacc-5.0/"/>
 
-  <property name="output"         location="output/ant"         />
-  <property name="output.java"    location="output/ant/java"    />
-  <property name="output.classes" location="output/ant/classes" />
-  <property name="output.junit"   location="output/ant/junit"   />
-  <property name="output.dist"    location="output/ant/dist"   />
+  <property name="output"                location="output/ant"         />
+  <property name="output.java"           location="output/ant/java"    />
+  <property name="output.classes"        location="output/ant/classes" />
+  <property name="output.classes.parser" location="${output.classes}/parser" />
+  <property name="output.classes.test"   location="${output.classes}/test" />
+  <property name="output.junit"          location="output/ant/junit"   />
+  <property name="output.dist"           location="output/ant/dist"   />
 
   <property name="java.parser.package" value="org/adjective/syntactic/parser" />
 
         javacchome="${javacc.home}" />
   </target>
 
-  <target name="compile">
-    <mkdir dir="${output.classes}" />
+ 
+  <!-- ******************
+        Java Compilation 
+       ****************** -->
 
-    <javac 
-        deprecation="false" 
-        debug="true" 
-        destdir="${output.classes}">
+  <path id="path.compile.parser" />
 
+  <path id="path.compile.test" >
+     <pathelement location="${output.classes.parser}" />
+     <fileset dir="../lib/test/" />
+  </path>
+ 
+  <macrodef name="compile">
+    <element name="source" />
+    <attribute name="out" />
+    <attribute name="classpath" />
+    <sequential>
+      <mkdir dir="@{out}" />
+      <javac 
+          deprecation="false" 
+          debug="true" 
+          destdir="@{out}">
+
+          <source />
+          <classpath refid="@{classpath}" />
+      </javac>
+    </sequential>
+  </macrodef>
+
+  <target name="compile" depends="compile.parser, compile.test" />
+
+  <target name="compile.parser" >
+    <compile out="${output.classes.parser}" classpath="path.compile.parser" >
+      <source>
         <src path="${output.java}" /> 
         <src path="source/java/parser" /> 
-        <!-- <src path="source/java/test" />  -->
+      </source>
+    </compile>
+  </target>
 
-        <!--
-        <classpath>
-            <fileset dir="lib" />
-        </classpath>
-        -->
-    </javac>
+
+  <target name="compile.test" >
+    <compile out="${output.classes.test}" classpath="path.compile.test" >
+      <source>
+        <src path="source/java/test" /> 
+      </source>
+    </compile>
   </target>
 
   <target name="test">
     <mkdir dir="${output.junit}" />
     <junit fork="yes" forkmode="once"  dir="${basedir}" haltonerror="false" failureproperty="junit.failure" errorproperty="junit.error" >
-      <classpath>
-        <fileset dir="lib" />
-        <pathelement location="${output.classes}" />
+      <classpath >
+        <pathelement location="${output.classes.parser}" />
+        <pathelement location="${output.classes.test}" />
+        <fileset dir="../lib/test/" />
       </classpath>
       <batchtest todir="${output.junit}">
         <fileset dir="source/java/test">
         <attribute name="Implementation-Revision" value="${hg.version}"/>
         <attribute name="Built-Date"              value="${tstamp.date} ${tstamp.time}"/>
       </manifest>
-      <fileset dir="${output.classes}" />
+      <fileset dir="${output.classes.parser}" />
     </jar>
   </target>
 
     <delete dir="${output}" />
   </target>
 
-<!--
-  <target name="fix">
-    <replace dir="source/java/parser/" 
-      token="public Object jjtAccept(final JavaParserVisitor visitor, final Object data)"
-      value="public &lt;R,T&gt; R jjtAccept(final JavaParserVisitor&lt;R,T&gt; visitor, final T data)" />
-  </target>
--->
-
-
 </project>