The Big SCons rewrite

At the end of summer 2005 Jonathan Jacobs sent in a first overhaul for the scripts as they were, already an improvement over the existing system. It was not until December that I could start a proper rewrite. At first I based my work on Jonathans overhaul. To accomodate for better configuration and easier setup of new scripts, as well as for increased maintainability also the overhaul went into complete rewrite.

The result of the rewrite, which took 2 months of more or less constant development, some large changes in architecture along the way, was finally committed on February the 4th.

The most important features boosted by the rewrite are:

  • better control of (user) configuration options: default platform options are now in a config/ directory in the CVS. Each platform has its own set of options. Through a user-config.py file the user can override any of these default settings. For quick test, these options can also be given on the command-line. Defaults are overridden by user-config, which are overridden by the command-line.
  • improved maintainability: through a few wrapper functions adding new libraries is very easy, changing names of parts is handled in one place only, and the functions keep track of how the structure of the project is.
  • gain in speed: through better and thoughtful implementation, a lot of the SCons overhead has been eliminated, resulting in 35% faster compile times on average.

As some extras there is now colour in the output, to show important parts. Also a quieter output is by default installed. Further, thanks to the internal bookkeeping of the new system, you can tell the system to compile only a specific part, like ‘scons BF_QUICK=src’ which builds only anything in the src directory if necessary.

For more information, check out the two documents on the new implementation at

There’s also a page on the Developers Wiki that covers the Scons Refactoring

Advertisement