Waf is a
build automation tool designed to assist in the automatic
compilation
Compilation may refer to:
*In computer programming, the translation of source code into object code by a compiler
**Compilation error
**Compilation unit
*Product bundling, a marketing strategy used to sell multiple products
*Compilation thesis
M ...
and installation of
computer software
Software is a set of computer programs and associated documentation and data. This is in contrast to hardware, from which the system is built and which actually performs the work.
At the lowest programming level, executable code consists ...
. It is written in
Python
Python may refer to:
Snakes
* Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia
** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia
* Python (mythology), a mythical serpent
Computing
* Python (pro ...
and maintained by Thomas Nagy.
Waf's
source code
In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
is
open source software, released under the terms of the
New BSD License
BSD licenses are a family of permissive free software licenses, imposing minimal restrictions on the use and distribution of covered software. This is in contrast to copyleft licenses, which have share-alike requirements. The original BSD lice ...
, though its accompanying documentation is under the
CC-BY-NC-ND
A Creative Commons (CC) license is one of several public copyright licenses that enable the free distribution of an otherwise copyrighted "work".A "work" is any creative material made by a person. A painting, a graphic, a book, a song/lyrics ...
license, which forbids both modification and commercial redistribution: this prevents vendors such as the
Debian
Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of D ...
project from including Waf documentation in their distributions.
History
Thomas Nagy created a build automation tool called ''BKsys'' which was designed to sit on top of
SCons
SCons is a computer software build tool that automatically analyzes source code file dependencies and operating system adaptation requirements from a software project description and generates final binary executables for installation on the targe ...
, providing higher-level functionality similar to that of
Autotools. This was part of an effort for switching
KDE
KDE is an international Free software movement, free software community that develops free and open-source software. As a central development hub, it provides tools and resources that allow collaborative work on this kind of software. Well-know ...
away from Autotools to a more modern build system in the beginning stages of the
KDE 4
KDE Software Compilation 4 (KDE SC 4) was the only series of the so-called KDE Software Compilation (short: KDE SC), first released in January 2008 and the last release being 4.14.3 released in November 2014. It was the follow-up to K Desktop En ...
development cycle. BKsys/SCons was chosen by the KDE community as their new standard build system. When Thomas Nagy decided that SCons's fundamental issues (most notably the poor scalability) were too complex and time-consuming to fix, he started a complete
rewrite which he named ''Waf''. With BKsys being recognized as a dead end, KDE decided to switch to
CMake
In software development, CMake is cross-platform free and open-source software for build automation, testing, packaging and installation of software by using a compiler-independent method. CMake is not a build system itself; it generates anothe ...
instead; however, Waf continued to be maintained as an individual project and has since seen prolific development and adoption by other communities.
Features
Waf features:
* Portable to Unix and non-Unix systems
* Lightweight
* Offers a
Turing-complete
In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming language, or a cellular automaton) is said to be Turing-complete or computationally universal if it can be used to simulate any Tur ...
programming language (similar to
SCons
SCons is a computer software build tool that automatically analyzes source code file dependencies and operating system adaptation requirements from a software project description and generates final binary executables for installation on the targe ...
)
* Support for standard targets: configure, build, clean, , install, and uninstall
* Parallel builds
* 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
Waf supports:
* A
C/
C++ preprocessor for computing dependencies
*
Fortran is supported with automated detection of Module dependencies
* Support for
OCaml
OCaml ( , formerly Objective Caml) is a general-purpose programming language, general-purpose, multi-paradigm programming language which extends the Caml dialect of ML (programming language), ML with object-oriented programming, object-oriented ...
and hybrid programs, and for
GNOME
A gnome is a mythological creature and diminutive spirit in Renaissance magic and alchemy, first introduced by Paracelsus in the 16th century and later adopted by more recent authors including those of modern fantasy literature. Its characte ...
programs
* Support for the
D programming language
D, also known as dlang, is a multi-paradigm system programming language created by Walter Bright at Digital Mars and released in 2001. Andrei Alexandrescu joined the design and development effort in 2007. Though it originated as a re-engineeri ...
(both gdc and dmd are supported)
* Support for
C#,
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
,
Python
Python may refer to:
Snakes
* Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia
** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia
* Python (mythology), a mythical serpent
Computing
* Python (pro ...
project
* Provides various tools for processing
DocBook,
man pages,
Waf is written in
Python
Python may refer to:
Snakes
* Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia
** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia
* Python (mythology), a mythical serpent
Computing
* Python (pro ...
. Rather than being intended to be
installed as a prerequisite piece of system software, as with build systems such as
GNU make
In software development, Make is a build automation tool that automatically builds executable programs and libraries from source code by reading files called ''Makefiles'' which specify how to derive the target program. Though integrated devel ...
, it is distributed as a
script
Script may refer to:
Writing systems
* Script, a distinctive writing system, based on a repertoire of specific elements or symbols, or that repertoire
* Script (styles of handwriting)
** Script typeface, a typeface with characteristics of handw ...
including an embedded
archive file, intended to be run to unpack the Waf sources within a project's own source tree.
License
Waf's
source code
In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
is released under the terms of the
New BSD License
BSD licenses are a family of permissive free software licenses, imposing minimal restrictions on the use and distribution of covered software. This is in contrast to copyleft licenses, which have share-alike requirements. The original BSD lice ...
. However, Nagy's intent is that Waf is to be included as part of an individual software project rather than installed as a system-wide build system. To that effect, the documentation which is shipped as part of the Waf release is under the
CC-BY-NC-ND
A Creative Commons (CC) license is one of several public copyright licenses that enable the free distribution of an otherwise copyrighted "work".A "work" is any creative material made by a person. A painting, a graphic, a book, a song/lyrics ...
license, which forbids both modification and commercial redistribution: this change was made in order to obstruct the
Debian
Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of D ...
project from including Waf as a system-wide software package. While Debian initially simply refrained from including documentation, a direct request from Nagy made Debian remove Waf and discourage its use as a build system.
Debian developer
Ian Jackson
Ian Jackson is a longtime free software author and Debian developer. Jackson wrote dpkg (replacing a more primitive Perl tool with the same name), SAUCE (Software Against Unsolicited Commercial Email), userv and debbugs. He used to maintain the Lin ...
opined that using Waf as distributed in a build system for software under the terms of the
GNU General Public License
The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the Four Freedoms (Free software), four freedoms to run, study, share, and modify the software. The license was th ...
(
GNU GPL) would be in breach of the terms of that license, as the unpacking script produces an
obfuscated
Obfuscation is the obscuring of the intended meaning of communication by making the message difficult to understand, usually with confusing and ambiguous language. The obfuscation might be either unintentional or intentional (although intent u ...
copy of its original source code rather than the "preferred form for modification", as is required by the GPL's wording on build systems.
[.]
See also
*
List of build automation software
*
SCons
SCons is a computer software build tool that automatically analyzes source code file dependencies and operating system adaptation requirements from a software project description and generates final binary executables for installation on the targe ...
*
Buildbot
*
Buildout
Buildout is an open-source software build tool. Buildout is created using the Python programming language. It implements a principle of separation of configuration from the scripts that do the setting up.
Buildout is primarily used to download a ...
References
External links
*
waf on GitLab* {{Openhub, waf, Waf
Build automation
Compiling tools
Free software programmed in Python
Software using the BSD license