You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.xml 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <project default="extractAndJar" basedir=".">
  2. <!-- top-level -->
  3. <target name="extractAndJar" depends="extract,jar,srcjar" />
  4. <target name="extract" depends="unzipSource,createPatchedSource" />
  5. <target name="jar" depends="pack">
  6. <copy file="../lib/regexp/jakarta-regexp-1.2.jar"
  7. tofile="bcel/lib/Regex.jar" />
  8. <ant dir="bcel" target="jar" />
  9. <copy file="bcel/bin/bcel.jar" toDir="." />
  10. </target>
  11. <target name="srcjar" depends="pack">
  12. <zip basedir="bcel" destfile="bcel-src.zip" includes="*/**" excludes="bin/**,lib/**"/>
  13. </target>
  14. <target name="push">
  15. <copy file="bcel.jar" todir="../lib/bcel" />
  16. <copy file="bcel-src.zip" todir="../lib/bcel" />
  17. </target>
  18. <target name="diff" depends="pack">
  19. <!-- Wipe out some of the rubbish that can arise due to doing a 'ant jar' before doing the diff -->
  20. <delete dir="bcel/bin"/>
  21. <delete dir="bcel/lib"/>
  22. <exec dir="." executable="diff.exe" output="patch.txt">
  23. <arg line="-N"/> <!-- Treat absent files as empty -->
  24. <arg line="-a"/> <!-- Treat all files as text -->
  25. <arg line="-u"/> <!-- Output (default 3) lines of unified context -->
  26. <arg line="-r"/> <!-- Recursively compare any subdirectories found -->
  27. <arg line="-b"/> <!-- Ignore changes in the amount of white space -->
  28. <arg line="bcel-5.1" />
  29. <arg line="bcel" />
  30. </exec>
  31. </target>
  32. <target name="clean">
  33. <delete dir="bcel-5.1" />
  34. <delete dir="bcel" />
  35. <delete file="bcel.jar" />
  36. <delete file="bcel-src.zip" />
  37. <delete dir="src" />
  38. <mkdir dir="src" /> <!-- empty src dir -->
  39. </target>
  40. <!-- internals -->
  41. <target name="unzipSource">
  42. <delete dir="bcel-5.1" />
  43. <unzip src="bcel-5.1-src.zip" dest="." />
  44. </target>
  45. <target name="createPatchedSource" depends="patch,unpack" />
  46. <target name="patch">
  47. <delete dir="bcel" />
  48. <copy todir="bcel">
  49. <fileset dir="bcel-5.1" />
  50. </copy>
  51. <patch patchfile="patch.txt" strip="1" dir="bcel" />
  52. </target>
  53. <target name="pack">
  54. <delete dir="bcel/src/java" />
  55. <copy toDir="bcel/src/java">
  56. <fileset dir="src" />
  57. </copy>
  58. </target>
  59. <target name="unpack">
  60. <delete dir="src" />
  61. <copy toDir="src">
  62. <fileset dir="bcel/src/java" />
  63. </copy>
  64. </target>
  65. </project>