Skip to content, Skip to search


Fiji/Build System

2,825 bytes added, 10:52, 1 October 2008
Describe Fake
== Introduction ==

Fake is Fiji's build system (''Fiji's mAKE''). Its goal is to make it extremely simple to define the tasks that are needed for Fiji.

Fake finds its ''targets'' in a file called ''Fakefile''. An example ''Fakefile'' looks like this:

all <- example.jar another-example.jar

example.jar <- example/**/*.java README LICENSE

another-example.jar <-

This file defines three targets: the default target called 'all', and two targets building .jar files. The operation is defined implicitly by the name of the target.

== Nomenclature ==

The ''Fakefile'' contains ''rules'' for ''targets'' that are defined in the following form:

target <- prerequisites

If a prerequisite is also the target of another rule, Fake builds that target before building the current one.

== Calling Fake ==

If you have a working Fiji launcher, you can call Fake like this:

./fiji --fake

If your Fiji launcher does not work, but you have a working Java, call Fake like this:

java -jar precompiled/fake.jar

== Target types ==

The following target types are available:

;The ''all'' target:
:The first target in the ''Fakefile'' is always the default target. It lists all subtargets that are to be made by default.

;''.jar'' targets:
:If the target name ends with ''.jar'', a .jar is made. If the last prerequisite also ends in ''.jar'', Fake will copy that file instead of trying to compile ''.java'' files.

:Fake is actually quite clever when it comes to putting the compiled classes into the ''.jar'' files; it figures out in which package the class lives, and uses the corresponding path.

;''.class'' targets:
:Targets whose name end in ''.class'' compile a single ''.java'' file (the last prerequisite is used to define that), and copies the resulting ''.class'' file (and the other generated classes that are used by this class) to the given destination.

;''.cxx'' and '.c' targets:
:If the last prerequisite ends in ''.cxx'' or ''.c'', the GNU C compiler is called to compile the prerequisites.

;"SubFake" targets:
:If the last prerequisite specifies a directory, Fake looks for a ''Fakefile'' or a ''Makefile'' there. According to what was found, Fake or ''make'' is called, and the target is copied over to the given destination.

;Special targets:
:Some targets are predefined, but can be overridden in the ''Fakefile''. These include ''clean'', ''show-vars'' and others.

== Special targets ==

:Remove all generated targets. This target is not well tested. '''Use with care'''.

:Show all defined variables

:Show all rules (with expanded variables)

:Instead of building the targets, this target just shows which targets are not up to date and would be built.

== Variables ==


== Other features ==

=== Precompiled targets ===

Bureaucrat, incoming, administrator, uploaders