By Forrest Cook
August 26, 2008
After a two month release candidate stabilization period, version
1.0 of the SCons
build tool has been released. The SCons description states:
SCons is an Open Source software construction tool—that is, a next-generation build tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache. In short, SCons is an easier, more reliable and faster way to build software.
SCons is being distributed under the MIT license.
Steven Knight is the main developer, the rest of the SCons Development
team consists of
Chad Austin, Charles Crain, Steve Leblanc, Greg Noel, Gary Oberbrunner,
Anthony Roach, Greg Spencer and Christoph Wiedemann.
The SCons project history is described:
SCons began life as the ScCons build tool design which won the Software Carpentry SC Build competition in August 2000. That design was in turn based on the Cons software construction utility. This project has been renamed SCons to reflect that it is no longer directly connected with Software Carpentry (well, that, and to make it slightly easier to type...).
An SCons document entitled
TheBigPicture
and the
Wikipedia entry
explain some of the unique SCons features.
These include:
- Designed in a modular fashion.
- Uses Python scripts for configuration files.
- Has automatic dependency analysis features for C, C++ and Fortran.
- Supports many other languages and documentation formats.
- Supports multiple compilers for a given language.
- Provides a global view of all source tree dependencies.
- Uses MD5 signatures for detecting file changes.
- Has built-in support for numerous version control systems.
- Can access a large number of utility
tools.
- Operates with a large collection of
command line options.
- Integrates with a number of popular IDEs.
- Supports parallel compilation with load control.
- Is user extensible.
- Supports cross-platform operation and project development.
To get an idea where SCons stands in the variety of build tools
that are available, the documentation includes
a comparison between SCons and other tools.
The project's documentation is quite voluminous.
The nearly 10,000 line man page
is somewhat daunting, it even dwarfs the 8000 line long
mplayer
man page. Fortunately, the document is available in an indexed
html version for easier reading.
A test installation of SCons 1.0 was tried on an Ubuntu i386 Hardy
Heron machine. The code was
downloaded,
uncompressed and untared, then the following command was
executed as root from the source directory: python setup.py install.
A test of SCons was performed on a relatively simple C program
that prints out the data from a stepped sine wave (sine2hex.c).
After plowing through some of the man page and doing a bit of
digging through the
SCons User Guide, your author
succeeded in compiling and linking the program.
An SConstruct file was created to describe the project, it consisted of
the following line:
Program('sine2hex.c', LIBS = 'm')
Typing scons caused SCons to compile and link the program.
That is, of course, only the tip of the iceberg, but it shows that
the software is not too difficult to get started with.
SCons is being used by a variety of closed and open-source code
software projects, the
References
section lists these and includes user comments about the
advantages of switching from other build tools.
If you need a next-generation tool for maintaining a large
cross-platform project, SCons should be able to do the job.
(
Log in to post comments)