From: Walter Landry (wlandry_at_[hidden])
Date: 2006-04-24 17:41:19
As promised, I am giving a brief overview of how I use BuildSystem
. First of all, I did not develop BuildSystem, I just use it.
Also, it is not a finished product. But it is the only configuration
system I know of that runs on Windows without installing Cygwin or
mingw . It's autodetection is not as developed on Windows as on
BuildSystem is meant to be a replacement for Autoconf. It runs a
number of tests on your machine to see what compilers, libraries,
headers, executables, etc there are. It has a facility for generating
files for inclusion into make files, and can also generate headers. I
do not, at present, use either of those two facilities. Rather, I use
the ability to perform substitutions in files. I use SCons to build
the software, so I perform substitutions on SContruct.in.
BuildSystem is written almost entirely in Python. The only exceptions
are two shell scripts: config.guess and config.sub. Those would have to be replaced
For an example of using BuildSystem, go to
In that file, the real meat is in a try...except block most of the way
down. The rest checks for bad pythons, bad threading libraries,
option parsing, error handling, etc.
In that try...except block, there are a number of calls to
addArgumentSubstition. Those calls tell configure which variables to
do substitutions for. The line with "framework.configure" does the
actual configurations and substitions. That jumps us to the configure
function in Configure.py
The interesting part there is in setupDependencies which enumerates
which packages to configure. For this code, we need libxml2, petsc,
and mpi. So we will look at the libxml2 package in
The meat of that work is done in configureLibrary(). This is where
the rubber meets the road and tests really get written. It starts by
checking for includes, and can optionally take common directories to
look in. It does a similar thing for libraries, though it really
checks whether you can link with that library. Finally, if include
and library directories are found, then it writes out the
The libxml2 package derives from Package.package.Package
which implements some of these library and include checks. So
libxml2.py could probably be shortened.
I realize that this is a brief introduction. So if you have any
questions, please ask.
 MPC, which has been mentioned elsewhere, does not seem to do
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk