QUICK START
-----------

This readme serves as a quick start, please use `man mmake' for
documentation on the mmake script.


Installation:
-------------

  -  ./configure
  -  make install
  -  man mmake

This will install mmake and the man-file in /usr/local/bin and
/usr/local/man/man1 respectively. If you want another location than
/usr/local, run configure with the prefix options, like so:
./configure --prefix=<dir>

Using the script:
-----------------

If you have structured your java files into packages, run mmake in
the topmost directory:

`-- src          <-- Run mmake in this directory
    `-- org      <-- Package structure starts here
        `-- acme
            |-- package1
            |-- package2
            `-- package3

If you don't use packages, simply run mmake in the same directory as
your java files.

mmake will give you one Makefile for managing your Java files and
package-structure. Although it's easy to setup and use mmake in a
recursive make-file context, you really don't want that. To see why,
read the excellent article: 'Recursive Make Considered Harmful' at
http://www.canb.auug.org.au/~millerp/rmch/recu-make-cons-harm.html


Compiling:
----------

Before you conduct a build you may have to set the CLASSPATH
environment variable. This could be done in the shell from where you
run make, or inserted explicit into the Makefile. Here's an example on
how to set the CLASSPATH variable in the Makefile.

#
# Example: Append Java Servlet Development Kit and current dir.
#          to the CLASSPATH environment variable
#
export CLASSPATH := $(CLASSPATH):/usr/local/common/servlet-api.jar:.


Dependencies:
-------------

The built-in dependency check in the java compiler may/will kick in
and compile depending java files in the "background" before make will
get a chance to compile the file. This is not a problem, (on the
contrary) but can give the impression that make forgot to compile
classes, when looking at the output from make.


Testing mmake:
--------------

See the README file in the tildeslash sub-directory


Notes:
------

- We use GNU xargs when building the jar file for a reason - to avoid
a situation where the shell's command buffer is exceeded. This could
happen if lots of stuff is going into the jar file and the build
command was something like (it looks nicer though):

%.jar: $(JAVA_OBJS) $(RESOURCE_OBJS)
	$(JAR) $(JAR_FLAGS) $(JAR_FILE) $(JAVA_OBJS) $(RESOURCE_OBJS)

GNU xargs has a default command-line buffer that defaults up to 20k,
while a POSIX.1 system is only guaranteed to have a 4k shell
command-line buffer (although it's usually larger).  This is also the
reason why xargs is used in the clean target together with find.

- Intermediate .java files produced from .xjava files are not deleted
after a build is conducted. This is not a bug, but a feature - because
it's then not necessary to run CPP if there is a dependency between a
regular .java file and a .xjava file and the .xjava file was not
changed.

- The uninstall target only remove installed files, not installed
directories.

- When you have created a Makefile with mmake, try 'make help' to see
a list of all the available targets.

- See also the CHANGES file for information
