2 <project name="bkell-clj" default="usage" basedir=".">
5 <property name="ant.build.javac.target" value="1.5" />
8 <path id="bookkeeping.classpath">
9 <pathelement path="${dir.build}/gen" />
10 <pathelement path="${dir.build}/src" />
11 <pathelement path="${dir.build}/test" />
12 <pathelement path="lib/" />
13 <pathelement path="xml/" />
14 <pathelement path="xml/http/" />
15 <pathelement path="test/xml/" />
16 <pathelement path="test/xml/http/" />
17 <pathelement path="." />
19 <include name="**/*.jar" />
20 <include name="**/*.properties"/>
22 <fileset dir="${java.home}/lib" >
23 <include name="**/*.jar"/>
29 <!-- =============================== -->
30 <!-- TASK DEFINITIONS -->
31 <!-- =============================== -->
32 <taskdef name="if" classpathref="bookkeeping.classpath" classname="ise.antelope.tasks.IfTask"/>
33 <taskdef name="sablecc" classpathref="bookkeeping.classpath" classname="org.sablecc.ant.taskdef.Sablecc"/>
36 <!-- =============================== -->
37 <!-- INITIALIZE THE BUILD PROCESS -->
38 <!-- =============================== -->
40 <loadproperties srcFile="build.properties" />
46 <!-- =============================== -->
47 <!-- COMPILE targets -->
48 <!-- =============================== -->
49 <target name="compile-all" depends="init,compile-src"/>
51 <target name="compile-src" depends="init,compile-gen">
53 <echo message="COMPILING JAVA SOURCE"/>
54 <mkdir dir="${dir.build}/src"/>
56 <javac srcdir="${dir.src}" destdir="${dir.build}/src" debug="true" fork="yes" >
59 <pathelement path="${dir.build}/test" />
60 <pathelement path="${dir.build}/gen" />
61 <pathelement path="${dir.build}/src" />
62 <pathelement path="xml" />
63 <fileset dir="${java.home}/lib" >
64 <include name="**/*.jar"/>
67 <include name="**/*.jar" />
68 <include name="**/*.properties"/>
75 <target name="compile-gen" depends="init,run-cc">
78 <!-- copy over Token with a toString() that doesn't add extra stuff
79 <copy todir="gen/com/interrupt/bookkeeping/cc/node/" overwrite="true">
80 <fileset file="src/com/interrupt/bookkeeping/cc/node/Token.java" />
84 <echo message="COMPILING GEN SOURCE"/>
85 <mkdir dir="${dir.build}/gen"/>
86 <javac srcdir="gen" destdir="${dir.build}/gen" fork="yes" debug="true" deprecation="on" >
89 <pathelement path="${dir.build}/src" />
90 <pathelement path="${dir.build}/test" />
91 <fileset dir="${java.home}/lib" >
92 <include name="**/*.jar"/>
95 <include name="**/*.jar" />
96 <include name="**/*.properties"/>
102 <!-- copy over SableCC dat files -->
103 <copy todir="${dir.build}/gen" >
104 <fileset dir="gen" includes="**/*.dat" />
110 <target name="run-cc" depends="init">
112 <available file="gen/com/interrupt/bookkeeping/cc/analysis" property="ccExists" />
117 <sablecc src="etc/cc" outputdirectory="gen" includes="*.cc" />
119 <!-- need to hack the lexer code and there's no easy way to sub-type -->
120 <copy todir="gen/com/interrupt/bookkeeping/cc/lexer/" overwrite="true">
121 <fileset file="gen/Lexer.java" />