Waf
| Developer(s) | Thomas Nagy |
|---|---|
| Stable release | 1.6.10 / December 17, 2011 |
| Written in | Python[1] |
| Operating system | Windows, POSIX |
| Type | Software development tools |
| License | New BSD License |
| Website | waf.googlecode.com |
Waf is a build automation tool – a program that assists in the automatic compilation and installation of other programs or libraries.
Contents |
[edit] Features
[edit] General
- Portable to Unix and non-Unix systems
- Lightweight
- Offers a Turing-complete programming language (similar to SCons)
- Support for standard targets: configure, build, clean, distclean, install, and uninstall
[edit] Language Support
- A C/C++ preprocessor for computing dependencies
- Fortran is supported with automated detection of Module dependencies
- Support for OCaml and hybrid programs, support for GNOME programs
- Support for the D programming language (both gdc and dmd are supported)
- Support for C#, Java, Python project
- Provides various tools for processing DocBook, man pages, intltool/msgfmt
[edit] Other
- Colored output and progress bar display
- Scripts are Python modules
- XML script front-end and a dedicated, easy-to-parse "IDE output" mode to ease the interaction with integrated development environments
- Modular configuration scheme with customizable command-line parsing
- Daemon mode for background recompilation
- Find source files intelligently (glob()-like) to ease script maintenance
- Support for global object cache to avoid unnecessary recompilations
- Support for unit tests run on programs at the end of builds
[edit] Requirements
- No installation required: the waf script (only 95 KB) can be distributed and used directly
- Python is an external dependency
[edit] History
Thomas Nagy created a build automation tool called BKsys which was designed to sit on top of SCons, providing higher-level functionality similar to that of Autotools. When Thomas Nagy decided that SCons' fundamental issues (most notably the poor scalability) were too complex and time-consuming to fix, he started a complete rewrite which he named Waf.
In 2005 the KDE project considered moving from Autotools to SCons and BKsys in its builds, but a year later the decision was made to instead use CMake. Waf was still in a very early pre-alpha stage at that point.[2]
[edit] Example Waf file
Below is a very simple wscript that would compile a source called "hello-world.c" using the platform default c-compiler:
top = '.' out = 'build' def options(opt): opt.load('compiler_c') def configure(conf): conf.load('compiler_c') def build(bld): bld.program(source = 'hello-world.c', target = 'hello-world', features = 'c cprogram')
The project is built with the following command line:
waf configure build
[edit] Notable applications
Waf is used to build software by a number of different free and open source projects.
[edit] See also
[edit] References
- ^ "Ohloh Analysis Summary - Waf". Ohloh. http://www.ohloh.net/p/waf. Retrieved 2010-12-19.
- ^ Why the KDE project switched to CMake
- ^ "Building Ardour 3.X from source". 2010-10-04. https://ardour.org/building_ardour3. Retrieved 2011-04-11.
- ^ "Geany source compilation". http://www.geany.org/manual/index.html#source-compilation.
- ^ "NetJack2 (Installation)". http://trac.jackaudio.org/wiki/WalkThrough/User/NetJack2.
- ^ "projects:applications:midory". http://goodies.xfce.org/projects/applications/midori.
- ^ "how to build NS-3". http://www.nsnam.org/wiki/index.php/User_FAQ#How_to_build_NS-3.
- ^ "Install instructions". http://xmms2.org/wiki/Install_instructions.