Table of Contents
The Waf scripts are based on the following concepts:
The Waf philosophy is to avoid the pollution of the source directory by letting all files into the build directory. The build directory can be located on the system, out of the source directory (like in /tmp for example).
When Waf is launched, it looks for the user-defined Waf scripts which are files written in the Python language. The most important one is the top-level Waf script file in which several functions and attributes must be provided for defining a valid Waf project:
The top-level Waf script file name is "wscript"
A simple empty Waf project can be declared using a wscript file containing the following Python code:
srcdir = '.' blddir = 'output' def set_options(opt): print(' setting the options') def configure(conf): print(' executing the configuration') def build(bld): print(' building the project')
The minimum workflow for any project consists of the following steps:
To do this, the following shell commands will be:
$ waf configure setting the options executing the configuration $ waf build setting the options building the project