blob: d7ebba0e046837ad23cb9787188064cf76b3ce72 [file] [log] [blame]
Mark Slee95771002006-06-07 06:53:25 +00001<project name="thrifttest" default="test" basedir=".">
2
3 <description>Thrift Test Build File</description>
4
5 <property name="src" location="src" />
6 <property name="gen" location="gen-java" />
7 <property name="build" location="build" />
Aditya Agarwal68db1662006-09-06 00:18:29 +00008 <property name="cpath" location="../../lib/java/libthrift.jar" />
Mark Slee95771002006-06-07 06:53:25 +00009
10 <target name="init">
11 <tstamp />
12 <mkdir dir="${build}"/>
13 </target>
14
15 <target name="generate">
Aditya Agarwal68db1662006-09-06 00:18:29 +000016 <exec executable="../../compiler/cpp/bin/thrift">
Mark Slee78f58e22006-09-02 04:17:07 +000017 <arg line="--java ../ThriftTest.thrift" />
Mark Slee95771002006-06-07 06:53:25 +000018 </exec>
19 </target>
20
21 <target name="compile" depends="init,generate">
22 <javac srcdir="${gen}" destdir="${build}" classpath="${cpath}" />
23 <javac srcdir="${src}" destdir="${build}" classpath="${cpath}:${gen}" />
24 </target>
25
Mark Slee78f58e22006-09-02 04:17:07 +000026 <target name="compileonly">
27 <javac srcdir="${gen}" destdir="${build}" classpath="${cpath}" />
28 <javac srcdir="${src}" destdir="${build}" classpath="${cpath}:${gen}" />
29 </target>
30
Mark Slee95771002006-06-07 06:53:25 +000031 <target name="test" depends="compile">
32 <jar jarfile="thrifttest.jar" basedir="${build}"/>
33 </target>
34
35 <target name="clean">
36 <delete dir="gen-java" />
37 <delete dir="${build}" />
38 <delete file="thrifttest.jar" />
39 </target>
40
41</project>