The VR Juggler 2.0 build system is based on Doozer++, and thus the goals of Doozer++ extend into the VR Juggler build system. The VR Juggler build system has a much narrower scope than Doozer++, so it has some unique goals, and they are as follows:
Centralize the complexity of the build code
Minimize what users must remember to configure and compile the source
Port quickly to new platforms
In the following sections, we discuss each of the above goals in more detail.
Due to the size of the VR Juggler 2.0 source base (nearly 500,000 lines of C++ and Java by one estimate), it is important that the complexity of compiling be centralized rather than spread out over the entire source tree. Centralizing the complexity allows most of the work to be done once, the results of which can then be reused by the rest of the build code. This is the key tenet for the other goals.
Centralization of complexity allows the VR Juggler build to follow the goal of Doozer++ wherein tools and tasks are separated based on what they do. The result is that each of the module's has an Autoconf- and Doozer++-based configure script that bears the brunt of the work needed to hide complexity. Then, each module has one or more “glue” makefiles that pull everything together. These glue makefiles typically direct a given module's build process so that steps occur in the correct order. Because they oversee the whole compilation process, they are often large files with many targets, each of which is responsible for a specific task. With a configure script and a glue makefile, all that remains is a listing of source files that must be compiled. The makefiles that list source files are often very, very short and easy for anyone to extend.
With this foundation, the complexity is separated thusly:
Platform-specific work happens in a configure script where a flexible programming language is readily available
Flow of execution during compilation is directed by a single, often long, glue makefile
Source listings (for any language) are placed in short makefiles that are called by the glue makefile
Other steps have been taken to offload complexity or repeated
tasks into centralized components. For example, the directory
juggler/macros contains Autoconf/m4 macros that
can be used in configure scripts. Most of the macros are used to
detect and provide information about the various modules that comprise
VR Juggler. There are a few helper macros that build on top of
Doozer++ and common idioms we have used to simplify configure scripts
further.