www.delorie.com/gnu/docs/kawa/kawa_9.html   search  
Buy GNU books!

Kawa, the Java-based Scheme system

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3.2 Build Kawa using ant

Kawa now includes an Ant buildfile (build.xml). Ant is a part of the Apache Jakarta project. If you don't hava Ant installed, get it from http://jakarta.apache.org/builds/jakarta-ant/release/. The buildfile should work with Ant 1.3, but has only been tested with 1.4.1. The build is entirely Java based and works equally well on *nix, Windows, and presumably most any other operating system.

Once Ant has been installed and configured (don't forget to set the JAVA_HOME, and ANT_HOME environment variables), you should be able to change to the directory containing the build.xml file, and invoke the `ant' command. With the default settings, a successful build will result in a kawa-1.6.99.jar in the current directory

There are a few Ant "targets" of interest (they can be supplied on the Ant command line):

This is the default, it does classes and jar.
Compiles all the files into *.class files into the directory specified by the build.dir property.
Builds a jar into into the directory specified by the dist.dir property.
Run Kawa in a GUI window.
Deletes all files generated by the build, including the jar.

There is not yet a test target for running the testsuite.

The are various "properties" that control what ant does. You can override the on the command line or by editing the build.properties file in the same directory as build.xml. For example the build.dir directory tells ant where to build temporary files, and where to leave the resulting .jar file. For example, to leave the generated files in the sub-directory named BUILD do:
ant -Dbuild.dir=BUILD
A sample build.properties is provided and it contains comments explaining many of the options.

Here are a few general properties that help to customize your build:

Path to put the temporary files used for building.
Path to put the resulting jar file.
A suffix to add to the version label for your customized version.
Whether (true/false) the Javac "-g" option is enabled.
Whether (true/false) the Javac "-O" option is enabled.

Here are some Kawa-specific ones (all true/false): with-collections, with-references, with-awt, with-swing, enable-jemacs, and enable-servlet> See the sample build.properties for more information on these.

If you change any of the build properties, you will generally want to do an `ant clean' before building again as the build is often not able to notice that kind of change. In the case of changing a directory path, you would want to do the clean before changing the path.

A special note for NetBeans users: For some reason the build-tools target which compiles an Ant task won't compile with the classpath provided by NetBeans. You may do `ant build-tools' from the command line outside of NetBeans, in which case you will not want to use the clean target as that will delete the tool files as well. You can use the clean-build and/or clean-dist targets as appropriate. Alternatively you can add ant.jar to the build-tools classpath by copying or linking it into a lib/ext directory in Kawa's source directory (the one containing the build.xml file).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003