Umake Overview
Umake is a platform-independent Makefile generator. It works by
pre-processing, and then executing Python source code in CVS modules. These
files are called Umakefil and platform-specific .pcf files.
Since the files are executed in the Python interpreter, developers have done
some pretty crazy things with them. If fact, you could easily implement
a web server in a Umakefil if you wanted to (please don't!).
The list below provides a overview of how Umake works:
- The command umake is run in a directory with Umakefil/*.pcf
files.
- Umake figures out what platform it is running on. It then locates the
Umake configuration file for the platform in build/umakecf/*.cf for
the platform. It executes that configuration file.
- Umake now forms a list of the available .pcf files that were
configured for this platform in the umake configuration file. It takes
them, in order, and adds the file Umakefil to the end. These
files are fed to the Umake pre-processor. The pre-processor scans the
files, and converts some old statements, removes deprecated Umake calls,
and fixes some Python syntax errors. A file called Umakefil.upp
is created.
- The pre-processed Umakefil.upp is executed by Umake. This
generates a Makefile. On the Macintosh, the Makefile is really a
AppleScript.
In the case of multi-target Umakefils, Umake is executed recursively
on each of the sub-targets. The pre-processed Umakefil.upp will be
named after each of the targets, but will still have the .upp extension.