Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 1 | <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 Agarwal | 68db166 | 2006-09-06 00:18:29 +0000 | [diff] [blame] | 8 | <property name="cpath" location="../../lib/java/libthrift.jar" /> |
Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 9 | |
| 10 | <target name="init"> |
| 11 | <tstamp /> |
| 12 | <mkdir dir="${build}"/> |
| 13 | </target> |
| 14 | |
| 15 | <target name="generate"> |
Aditya Agarwal | 68db166 | 2006-09-06 00:18:29 +0000 | [diff] [blame] | 16 | <exec executable="../../compiler/cpp/bin/thrift"> |
Mark Slee | 78f58e2 | 2006-09-02 04:17:07 +0000 | [diff] [blame] | 17 | <arg line="--java ../ThriftTest.thrift" /> |
Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 18 | </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 Slee | 78f58e2 | 2006-09-02 04:17:07 +0000 | [diff] [blame] | 26 | <target name="compileonly"> |
| 27 | <javac srcdir="${gen}" destdir="${build}" classpath="${cpath}" /> |
| 28 | <javac srcdir="${src}" destdir="${build}" classpath="${cpath}:${gen}" /> |
| 29 | </target> |
| 30 | |
Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 31 | <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> |