# The BCEL-builder module

The contents of this directory are:

- This file
- build.xml -- an ant script
- patch.txt -- a diff patchfile

And pretty much nothing else. Well, then, what do you do with this directory? Well, the whole point is to generate bcel/bcel.jar in the lib package. To do so, first stick bcel-5.1-src.zip in this directory, then run ant. (at one point, this was available at http://archive.apache.org/dist/jakarta/bcel/source/bcel-5.1-src.zip) After much unzipping, patching, and compiling, you should get an appropriate bcel.jar file. Now put it in the appropriate place.

If there's something wrong with the bcel.jar in the lib project, well, then you've got some development to do. You'll need to know some more ant targets. But before anything, get that bcel-5.1-src.zip and stick it in this directory.

There are five top-level ant targets apart from the usual "clean":

- ant extractAndJar -- this is just the composition of the extract, jar and srcjar 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 archives: bcel.jar and bcel-src.zip, 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 and bcel-src.zip generated should be the same as that in ..\lib\bcel\.
- 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. For the patch file to be applied you need to have a patch.exe on your path, this bcel building process was tested with the version from cygwin.
- ant jar -- this copies the edited source from the project source directory and jars it up into bcel.jar, there to be tested.
- ant srcjar -- this copies the edited source from the project source directory and jars up the source code into bcel-src.zip.
- ant push -- this pushes the new bcel.jar and bcel-src.zip into ..\lib\bcel\. - ready to be used by the greater compiler.
- ant diff -- this creates the patch.txt file, composed of the differences between the project src directory and the original bcel-5.1 source. For the patch file to be built successfully you need to have a diff.exe on your path, this bcel building process was tested with the version from cygwin.

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.