Using ant

You should download and install ant, from http://jakarta.apache.org/ant/ before continuing In the top level directory you can get help on all build options by typing
% ant -projecthelp

Buildfile: build.xml
CAC library
Main targets:

 build     Generate the cac.jar file from the compiled source code
 buildrpm  Build RPM for Linux. Only works on Linux platforms
 clean     Deletes the build and dist directories
 compile   Compile the source 
 dist      Generate the distribution directory
 javadoc   Generate Javadoc for the source
 runtests  Run all unit tests

Default target: build
To create a distribution, which will compile the code type
ant dist
for example To recreate the API documentation, you would type
ant javadoc

Creating RPM's

To build, checkout the CVS tree on a Linux box and type "ant buildrpm". You should see something like the following, your RPM will be in build/RPMS/i386
[rmach@hypnos]$ ant buildrpm
Buildfile: build.xml

buildrpm:
      [rpm] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.87112
      [rpm] + umask 022
      [rpm] + cd /home/rmach/pbs/pbsaccounting/dist/BUILD
      [rpm] + cd /home/rmach/pbs/pbsaccounting/dist/BUILD
      [rpm] + rm -rf pbsaccounting-1.3.0
      [rpm] + /bin/gzip -dc /home/rmach/pbs/pbsaccounting/dist/SOURCES/pbsaccounting-1.3.0.tar.gz
      [rpm] + tar -xf -
      [rpm] + STATUS=0
      [rpm] + '[' 0 -ne 0 ']'
      [rpm] + cd pbsaccounting-1.3.0
      [rpm] ++ /usr/bin/id -u
      [rpm] + '[' 501 = 0 ']'
      [rpm] ++ /usr/bin/id -u
      [rpm] + '[' 501 = 0 ']'
      [rpm] + /bin/chmod -Rf a+rX,g-w,o-w .
      [rpm] Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.87112
      [rpm] + exit 0
      [rpm] Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.87112
      [rpm] + umask 022
      [rpm] + cd /home/rmach/pbs/pbsaccounting/dist/BUILD
      [rpm] + cd pbsaccounting-1.3.0
      [rpm] + exit 0
      [rpm] + umask 022
      [rpm] + cd /home/rmach/pbs/pbsaccounting/dist/BUILD
      [rpm] + cd pbsaccounting-1.3.0
      [rpm] + rm -rf /tmp/pbsaccounting-buildroot
      [rpm] + mkdir -p /tmp/pbsaccounting-buildroot/usr/local/pbsaccounting/
      [rpm] + mv xml /tmp/pbsaccounting-buildroot/usr/local/pbsaccounting/
      [rpm] + mv bin /tmp/pbsaccounting-buildroot/usr/local/pbsaccounting/
      [rpm] + /usr/lib/rpm/brp-compress
      [rpm] + /usr/lib/rpm/brp-strip
      [rpm] Processing files: pbsaccounting-1.3.0-1
      [rpm] + /usr/lib/rpm/brp-strip-comment-note
      [rpm] Finding  Provides: (using /usr/lib/rpm/find-provides)...
      [rpm] Finding  Requires: (using /usr/lib/rpm/find-requires)...
      [rpm] PreReq: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
      [rpm] Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
      [rpm] Wrote: /home/rmach/pbs/pbsaccounting/dist/RPMS/i386/pbsaccounting-1.3.0-1.i386.rpm
      [rpm] + umask 022
      [rpm] Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.24283
      [rpm] + cd /home/rmach/pbs/pbsaccounting/dist/BUILD
      [rpm] + cd pbsaccounting-1.3.0
      [rpm] + rm -rf /tmp/pbsaccounting-buildroot
      [rpm] + exit 0
      [rpm] Building the RPM based on the pbsaccounting.spec file

BUILD SUCCESSFUL
Total time: 4 seconds