This file contains some helpful recipes and other tips for people working with the source code.
Here's how I create javadocs for ANTLR on my cygwin installation.
[cclifton@MOJOE antlr !53]$ cd /usr/local/antlr
[cclifton@MOJOE antlr !53]$ CLASSPATH="."
[cclifton@MOJOE antlr !54]$ javadoc -private -d javadocs -link file:c:/cygwin/usr/local/jdkdocs/jdk1.4/docs/api -use -subpackages antlr
- Converting to decorator pattern * For a concrete decorator with a concrete superclass the subclass should inherit the delegee field and any methods that reference the field but should initialize the delegee to the appropriate subtype of the field's type. * Decorating recipe: - write test cases - make interfaces * cvs add * add to Makefile * change original class to implement interface - Change references * make tags for both packages * visit-tags-table for both packages * tags-query-replace J~ J~Type (be careful not to replace instantiations) - make Jml~ class * cvs add * add to Makefile * change package declaration * import mjc.* * implement interface * add constructor * add private fields * add accessors * delegate (watch for void and remove parameter types)
This recipe explains how to integrate changes submitted by those who do not have direct CVS access to the repository.
cvs -z3 -d:ext:multijava.cvs.sourceforge.net:/cvsroot/multijava checkout -D
YYYY/MM/DD HH:MM MultiJava
tar -tzvf
filename.tar.gz
tar -xzvf
filename.tar.gz
cvs -n update -A
to verify that the changes can
be integrated with the current repository. The -A
option removes the sticky tags that would otherwise cause
synchronization based the old date specified when checking out the
code.
cvs update -A
to synchronize changes from the
repository with your working code.
CLASSROOT
,
JCLASSROOT
, and CLASSPATH
to reference
your working directory. An easy way to do this is to change to the
MultiJava directory and source (i.e., execute
.
scriptfile) the shell script given below.
make rebuild-all
.
cvs rm
to
remove them from the repository as well.
make rebuild-all
.
make runtests 2>&1 | tee results.out
to run the
regression test suite.
results.out
.
Here is a shell script that is useful in following the recipe above.
#!/bin/bash -x # source this file in the directory which is the root of the MultiJava # source-code and it will set the pertinent environment variables export CLASSROOT=`cygpath -u -a .` export JCLASSROOT=`cygpath -w -a . | sed 's/\\\\/\\\\\\\\/g'` export CLASSPATH="`cygpath -w -a .`;${CLASSPATH}"