October 31, 2006
The Waf build system
What is Waf ?
This page is not up-to-date, Waf was moved to a google project page
Waf is a general-purpose build system which was modelled from Scons. Though it comes last in the arena of the build systems, we believe that Waf is a vastly superior alternative to its competitors (Autotools, Scons, Cmake, Ant, etc) for building software, and especially for open-source projects:
- Waf depends on Python only which is ported on most platforms
- Waf scripts are Python modules which are easier to learn and to maintain that custom languages
- Waf license has very little constraints (BSD) and can be redistributed easily (all in one 100kb script)
- Waf architecture is modular and can be extended easily, it relies on state-of-the-art algorithms
- Waf provides many more features than its competitors
- Waf provides many small projects and code snippets
Detailed feature list:
The following list is not exhaustive, lots of features are implicitely omitted.
- Fast rescan for incremental builds (developer working on the project)
- Coloured kernel-like output or progress bar (-v switch to display command-lines)
- Object-oriented target declaration
- Scripts as python modules
- XML script front-end to ease the interaction with integrated development environments
- A c/c++ preprocessor for computing dependencies
- Self-compiling and self-optimizing actions using a syntax similar to the one in scons
- Builddir set by default and with no effort, and now with build variants as well
- Modular configuration scheme with customizable command-line parsing
- Configuration variables are stored in an editable cache
- Real libtool emulation (turned off by default)
- No more hard-coded extensions like .so, .a or .exe
- Tight control over the scheduler (not all links at the end, etc)
- Daemon mode for background recompilation
- Find source files intelligently (glob-like) to ease script maintainance (all c-like classes)
- Support for objective caml and hybrid programs (kde3 program with a part written in caml)
- Support for gnome programs: c and mono (gtk#)
- No installation required: the waf script can be used directly (~110ko)
- Support for compiling only targets in a project sub-directory
- Support for standard targets: configure; build, clean, distclean, install, and uninstall
- Support for global object cache to avoid unnecessary recompilations
- Support for unit tests run on programs at the end of builds
- Win32 support and a module for MSVC (svn at the moment)
Resources
Download the latest distribution (12-12-2007) or use the svn repository:
svn checkout http://waf.googlecode.com/svn/trunk/ waf
Bug reports should be sent to the bug tracker
You may also join the irc channel #waf on freenode (there is more activity on evenings and weekends).
Recent changes
New wiki
The documentation is available here
Notes on task parallelization in waf

