org.aspectj/bcel-builder/build.xml

82 строки
2.3 KiB
XML

<project default="extractAndJar" basedir=".">
<!-- top-level -->
<target name="extractAndJar" depends="extract,jar,srcjar" />
<target name="extract" depends="unzipSource,createPatchedSource" />
<target name="jar" depends="pack">
<copy file="../lib/regexp/jakarta-regexp-1.2.jar"
tofile="bcel/lib/Regex.jar" />
<ant dir="bcel" target="jar" />
<copy file="bcel/bin/bcel.jar" toDir="." />
</target>
<target name="srcjar" depends="pack">
<zip basedir="bcel" destfile="bcel-src.zip" includes="*/**" excludes="bin/**,lib/**"/>
</target>
<target name="push">
<copy file="bcel.jar" todir="../lib/bcel" />
<copy file="bcel-src.zip" todir="../lib/bcel" />
</target>
<target name="diff" depends="pack">
<!-- Wipe out some of the rubbish that can arise due to doing a 'ant jar' before doing the diff -->
<delete dir="bcel/bin"/>
<delete dir="bcel/lib"/>
<exec dir="." executable="diff.exe" output="patch.txt">
<arg line="-N"/> <!-- Treat absent files as empty -->
<arg line="-a"/> <!-- Treat all files as text -->
<arg line="-u"/> <!-- Output (default 3) lines of unified context -->
<arg line="-r"/> <!-- Recursively compare any subdirectories found -->
<arg line="-b"/> <!-- Ignore changes in the amount of white space -->
<arg line="bcel-5.1" />
<arg line="bcel" />
</exec>
</target>
<target name="clean">
<delete dir="bcel-5.1" />
<delete dir="bcel" />
<delete file="bcel.jar" />
<delete file="bcel-src.zip" />
<delete dir="src" />
<mkdir dir="src" /> <!-- empty src dir -->
</target>
<!-- internals -->
<target name="unzipSource">
<delete dir="bcel-5.1" />
<unzip src="bcel-5.1-src.zip" dest="." />
</target>
<target name="createPatchedSource" depends="patch,unpack" />
<target name="patch">
<delete dir="bcel" />
<copy todir="bcel">
<fileset dir="bcel-5.1" />
</copy>
<patch patchfile="patch.txt" strip="1" dir="bcel" />
</target>
<target name="pack">
<delete dir="bcel/src/java" />
<copy toDir="bcel/src/java">
<fileset dir="src" />
</copy>
</target>
<target name="unpack">
<delete dir="src" />
<copy toDir="src">
<fileset dir="bcel/src/java" />
</copy>
</target>
</project>