This is the Fiji mAKE
---------------------

This is a simple replacement for "make" so that we can avoid

- relying on having GNU make installed,
- a complicated Makefile that only one guy understands, and
- having to work around make's limitations (such as looking exclusively
  at the mtime for the up-to-date check).

In addition, we can do very special things, such as automatically adding
staged-plugins/<name>.config as plugins.config to plugins/<name>.jar.

The main class is fiji.build.Fake.

When called without arguments, the prerequisites of "all" are made.

When called with arguments, the targets with the specified names are made.

Configuration
-------------

Fake looks for a "Fakefile" which consists of lines like these:

-- snip --
javaVersion=1.5

all <- plugins/*.jar fiji

plugins/xyz.jar <- submodule
plugins/abc.jar <- src-plugins/abc/*.java

# C stuff
CCFLAGS=-g -O2
CCFLAGS(win32)=-DWIN32 -DJRE_HOME=java/win32
LDFLAGS(linux32)=-ldl
LDFLAGS(linux64)=-ldl
LDFLAGS(macosx)=-ldl
fiji <- fiji.c
-- snap --

Empty lines and lines starting with a "#" are ignored.

Lines containing no arrow but an equal sign are treated as variable
assignments.  Later assignments override earlier ones, unknown variable
names will lead to an error.

Lines containing an arrow are treated as rules.  The supported rules are:

jar <- directory

	cd's into directory and runs "Fake", if Fakefile is found, or
	"make" otherwise.

	Adds staged-plugins/<jar>.config (if it exists) as plugins.config.

jar <- files

	makes .class files of all specified .java files, and makes a jar
	from them (non .java files will be added verbatim).

	Adds staged-plugins/<jar>.config (if it exists) as plugins.config.

class <- java

	makes a .class file from the specified .java file.

executable <- C/C++ file

	makes an executable from a C/C++ file, using gcc.

	On Windows, the extension .exe is automatically added.

file (executable) <- prerequisites

	calls executable with prerequisites to make file.

Up-to-date tests
----------------

	Just as for "make", the mtime decides if a file is up-to-date.

	In addition, "Fake" looks for the file "fake.cache" and if it
	finds that the recorded mtimes for the prerequisites have not
	changed, assumes that the target has been made.

	For .jar files, if the mtime of the target is older than any
	prerequisite's mtime, a test for the contents is performed.  If it
	turns out that the .jar file is up-to-date after all, the
	prerequisites are recorded in fkae.cache, together with their mtimes.

