summaryrefslogtreecommitdiffstats
path: root/bcel-builder
diff options
context:
space:
mode:
authorehilsdal <ehilsdal>2004-05-21 06:19:07 +0000
committerehilsdal <ehilsdal>2004-05-21 06:19:07 +0000
commitcdfb3edaeecc171e912040fc9c68fe002bfa459d (patch)
tree8bfd6f7721ac9d7616725b34c03b8b42835c1094 /bcel-builder
parent68bc96dd1086d5832e96395b09f49da2b8e5f995 (diff)
downloadaspectj-cdfb3edaeecc171e912040fc9c68fe002bfa459d.tar.gz
aspectj-cdfb3edaeecc171e912040fc9c68fe002bfa459d.zip
Hopefully better bcel-builder build system,
instigated by Andy actually trying to use this module the way it is supposed to be used
Diffstat (limited to 'bcel-builder')
-rw-r--r--bcel-builder/build.xml80
-rw-r--r--bcel-builder/readme.html52
2 files changed, 76 insertions, 56 deletions
diff --git a/bcel-builder/build.xml b/bcel-builder/build.xml
index 0310d4c3f..98aebeeb8 100644
--- a/bcel-builder/build.xml
+++ b/bcel-builder/build.xml
@@ -1,60 +1,70 @@
-<project default="unpackAndJar" basedir=".">
+<project default="extractAndJar" basedir=".">
- <target name="unpackAndJar" depends="unpack,jar" />
+ <!-- top-level -->
+ <target name="extractAndJar" depends="extract,jar" />
- <target name="jar">
+ <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="update">
+
+ <target name="push">
<copy file="bcel.jar" todir="../lib/bcel" />
</target>
-
- <target name="pack">
- <move toDir="bcel/src/java">
- <fileset dir="src" />
- </move>
- </target>
-
- <target name="unpack" depends="extract,patch,srcclean">
- <move toDir="src">
- <fileset dir="bcel/src/java" />
- </move>
- </target>
-
- <target name="extract">
- <unzip src="bcel-5.1-src.zip" dest="." />
+
+ <target name="diff" depends="pack">
+ <exec dir="." executable="diff.exe" output="patch.txt">
+ <arg line="-N"/>
+ <arg line="-a"/>
+ <arg line="-u"/>
+ <arg line="-r"/>
+ <arg line="-b"/>
+ <arg line="bcel-5.1" />
+ <arg line="bcel" />
+ </exec>
</target>
-
- <target name="srcclean">
- <delete dir="src/org" />
+
+ <target name="clean">
+ <delete dir="bcel-5.1" />
+ <delete dir="bcel" />
+ <delete file="bcel.jar" />
+ <delete dir="src" />
+ <mkdir dir="src" /> <!-- empty src dir -->
</target>
+
+ <!-- internals -->
- <target name="clean" depends="srcclean">
+ <target name="unzipSource">
<delete dir="bcel-5.1" />
- <delete dir="bcel" />
+ <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="diff">
- <exec dir="." executable="diff.exe" output="patch.txt">
- <arg line="-N"/>
- <arg line="-a"/>
- <arg line="-u"/>
- <arg line="-r"/>
- <arg line="-b"/>
- <arg line="bcel-5.1" />
- <arg line="bcel" />
- </exec>
+ <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>
diff --git a/bcel-builder/readme.html b/bcel-builder/readme.html
index b5a4c52c8..a0d20b60a 100644
--- a/bcel-builder/readme.html
+++ b/bcel-builder/readme.html
@@ -19,6 +19,9 @@
this directory? Well, the whole point is to generate bcel/bcel.jar in
the lib package. To do so, first stick
<strong>bcel-5.1-src.zip</strong> in this directory, then run ant.
+(at one point, this was available at
+<a href="http://archive.apache.org/dist/jakarta/bcel/source/bcel-5.1-src.zip">
+http://archive.apache.org/dist/jakarta/bcel/source/bcel-5.1-src.zip</a>)
After much unzipping, patching, and compiling, you should get an
appropriate bcel.jar file. Now put it in the appropriate place. </p>
@@ -28,28 +31,35 @@ to know some more ant targets. But before anything, get that
<strong>bcel-5.1-src.zip</strong> and stick it in this directory.
</p>
+<p> There are five top-level ant targets apart from the usual "clean":</p>
+
<ul>
- <li>ant unpack -- unpack the sources for the AspectJ-version of BCEL
- into the <strong>src</strong> subdirectory. Though you probably
- don't care, this invokes the following subtasks: </li>
-
- <ul>
- <li>ant extract -- extract the contents of bcel-5.1-src.zip
- into the bcel-5.1 directory.</li>
-
- <li>ant patch -- apply the patchfile patch.txt to the
- <strong>bcel-5.1/src</strong> directory, creating
- <strong>src</strong>.</li>
- </ul>
-
- <li>ant pack -- pack the sources for AspectJ's version of bcel back
- into a tiny little patchfile. This uses exec, and requires that you
- have diff somewhere on your path. Actually, it's much worse: it
- requires you have diff.exe somewhere on your path. I hate that I'm
- turning into a windows whore. </li>
-
- <li>ant clean -- get rid of everything extraneous in preparation for
- a checkin. </li>
+ <li>ant extractAndJar -- this is just the composition of the extract
+ and jar targets, and is the default. It extracts the source from bcel-5.1-src.zip,
+ patches it, compiles the patched version into a jar and drops the new jar,
+ bcel.jar, into the project root. This is the default task, mainly used
+ to sanity check the building and make sure we're generating something.
+ The bcel.jar this generates should be the same as that in ..\lib\bcel\bcel.jar.
+ </li>
+
+ <li>ant extract -- this extracts the source from bcel-5.1-src.zip,
+ patches it, and copies the patched source into the project src directory,
+ there to be visible by eclipse for people to do development on it.
+ </li>
+
+ <li>ant jar -- this copies the edited source from the project source
+ directory and jars it up into bcel.jar, there to be tested.
+ </li>
+
+ <li>ant push -- this pushes the new bcel.jar into ..\lib\bcel\bcel.jar,
+ ready to be used by the greater compiler.</li>
+
+ <li>ant diff -- this creates the patch.txt file, composed of the differences
+ between the project src directory and the original bcel-5.1 source. </li>
</ul>
+<p> All of the tasks are destructive, so don't do "ant extract", for example,
+if you have anything in the project source directory you care about.
+</p>
+
</body> </html>