Currently, the make system is setup as a single Makefile which includes make snippets from other places in the tree. This allows you to easily depend on other make rules, but also means all rules must exist in a flat namespace. You'll notice that the rules and variables in each .rul file will use a common prefix. For example, every rule in the parted.rul file begins with "parted_", and every variable begins with "PARTED_". Another thing to keep in mind when working within this system is that all paths are relevant to the toplevel. We may change to a recursive make style build system at some point.
The bulk of the SystemImager build system deals with building boel - the mini-distribution that runs on clients during an autoinstall. Most of the software in boel is built from third party source, and is not included in the CVS tree (although it is packaged up with released source tarballs). The build system, therefore, must be able to access these third party source tarballs in order to extract them and build the necessary binaries.
To facilitate this, each .rul file for a third party package contains a target for the source tarball. This rule runs the getsource script in the toplevel tools/ directory. getsource will look around your system for a source tarball (/usr/src, and the toplevel of the build tree), or will, as a last resort, use wget to download the source tarball from the Internet. It is highly suggested that you copy any downloaded source to one of those locations so that you only download it once. Remember that, even though it may not be costing you anything to download source repeatedly, it may be costing the people running the servers from which you're downloading. Running make clean attempts to remove everything *except* these third party tarballs. make distclean will clean those out too.
Boel is what we call the mini-distribution that runs on the autoinstall client. A subset of boel is the contents of the initrd.img file. After the client has booted and brought up networking, it receives the boel_binaries.tar.gz file, and extracts it over the root of the filesystem. This provides an additional set of commands, libraries, and kernel modules that maybe needed during the installation. The reason for the split-up is to keep initrd.img small enough to fit on a 1.44MB floppy.
On i386, uClibc http://uclibc.org is used within the initrd in order to keep it small enough to fit on a floppy. For the initrds for other architectures, and for the binaries in boel_binaries.tar.gz on every architecture, the mklibs script is used to copy over the required libraries from the build system. If appropriate pic libraries are found (e.g., the libc6-pic package in Debian), mklibs can take advantage of them and reduce the libraries to only the functions needed by the binaries.
Binaries that will be dynamically linked against need to be built using uClibc wrappers, which is why the PATH variable gets explicitly set for all the initrd binaries.