build.xml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <!-- ============================================================= -->
  2. <!-- This is an ANT build file to build j2cps from the sources in -->
  3. <!-- this directory. Typical invocation is -->
  4. <!-- $ ant { clean | compile | deploy} -->
  5. <!-- ============================================================= -->
  6. <project>
  7. <target name="help">
  8. <echo>Run "ant -projecthelp"</echo>
  9. </target>
  10. <target name="clean">
  11. <delete includeemptydirs="true">
  12. <fileset dir="build/j2cps"/>
  13. </delete>
  14. <delete includeemptydirs="true">
  15. <fileset dir="build/j2cpsfiles"/>
  16. </delete>
  17. <delete includeemptydirs="true">
  18. <fileset dir="deploy"/>
  19. </delete>
  20. </target>
  21. <!-- Set some property values -->
  22. <target name="init">
  23. <property name="JRoot" value="./../../"/>
  24. <property name="CPSYM" value=".;${JRoot}/symfiles;${JRoot}/symfiles/JvmSystem"/>
  25. </target>
  26. <!-- Build j2cps into build directory -->
  27. <target name="compile" depends="init" description="Compile J2CPS into a class tree rooted here">
  28. <mkdir dir="build"/>
  29. <javac srcdir="."
  30. destdir="build"
  31. debug="on"
  32. includeantruntime="false"
  33. />
  34. </target>
  35. <!-- Build j2cps into a jar file in deploy directory -->
  36. <target name="jarj2cps" depends="compile" description="Package J2CPS into ./deploy/j2cps.jar">
  37. <mkdir dir="deploy"/>
  38. <jar destfile="deploy/j2cps.jar" basedir="build">
  39. <manifest>
  40. <attribute name="Main-Class" value="j2cps/j2cps"/>
  41. </manifest>
  42. </jar>
  43. </target>
  44. </project>