This variable will be prepended to all other directory variables above. It is used for grouping the other directories into one root directory. If you dont want that, you may simply set the variable to an empty string in the Makefile. If the variable is empty you could still use it on the command line when you run make, for instance for a one-shoot installation like: make PREFIX=/local/myproject/ install
This variable denotes the top directory from where all class files will be installed. Its default value is classes, which I believe is a good value. Note: If you dont want to install any class files (because you are, for example, only going to use a jar file), set this variable to an empty string and no class files will be installed.
Resource files will also be installed below this directory if such files are present in a package structure. This is useful if you are using e.g. ResourceBundles to Localize your application and have your property files in its own directory in the package structure.
This variable tells the Makefile where to install the jar file. The default value is lib, which is also a good default value.
This variable tells the Makefile where to install the app bundle. The default value is lib, which is also a good default value.
When you run javadoc, all the html files will be put into this directory. Its default value is doc/api-docs. You should probably keep that name, but then again, you may change it as you like.
The Makefile uses this variable to install any shell wrapper-scripts that you have created. If you write an application, it is always nice for the user that you provide a wrapper script to start the application. Its default value is bin. (The Makefile will only install shell-scripts that has the extension .sh. The mmake script will tell the Makefile where to look for shell-scripts)
If you keep the default values you will get an installation tree that looks like this:
-- PREFIX |-- bin |-- classes | -- package <--- Example of a sub-directory | |-- sub-package1 | |-- sub-package2 | -- sub-package3 |-- doc | -- api-docs -- lib
This is a excellent tool for managing projects with several different versions. The idea behind using the C preprocessor with Java is to better manage different versions more easily. This is done by using CPP conditional statements in the source files. I would strongly advise you not to use CPP to redefine the Java language itself.
To use the C preprocessor together with Java, you can change the name of the source files that you want to preprocess from <filename>.java to <filename>.xjava. The Makefile has a rule to build .class files from .xjava files.
It is not necesarry to change every file from .java to .xjava. The Makefile will work well and consistently in an environment of both .java and .xjava files. (E.g. make clean will only remove .java files that were created from a .xjava file. Other java files will, of course, not be removed.)
You can now use cpp Conditionals in Your Java-code, for example, as follows:
#ifdef JAVA1_1 [code1] #else [code2] #endif
The JAVA1_1 label in the above example is tested against the VERSION variable in the Makefile. That is, if the VERSION variable is JAVA1_1, then [code1] would be compiled and [code2] left out. Likewise, if VERSION is something else than JAVA1_1, then [code2] would be compiled and [code1] left out of the resulting .class file.
mmake will give you one Makefile for managing your Java files. Although its easy to setup and use mmake in a recursive makefile context, you dont want to do 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
mmake will need the following:
o Perl 5.x o Gnu make o Gnu xargs (recommended)
Jan-Henrik Haukeland <firstname.lastname@example.org>
|April 2. 2004||MMAKE (1)||www.tildeslash.com|