Module called for configuring, compiling and installing targets
This is the main entry point, all Waf execution starts here.
Read the main wscript file into waflib.Context.Context.g_module and bind default functions such as init, dist, distclean if not defined. Called by waflib.Scripting.waf_entry_point() during the initialization.
Parse the command-line options and initialize the logging system. Called by waflib.Scripting.waf_entry_point() during the initialization.
Execute a single command. Called by waflib.Scripting.run_commands().
Execute the commands that were given on the command-line, and the other options Called by waflib.Scripting.waf_entry_point() during the initialization, and executed after waflib.Scripting.parse_options().
Distclean function called in the particular case when:
top == out
removes the build directory
Create an archive containing the project source code:
$ waf dist
Create the archive.
Return the name of the archive to create. Change the default value by setting arch_name:
def dist(ctx): ctx.arch_name = 'ctx.tar.bz2'
Return the default name of the main directory in the archive, which is set to appname-version. Set the attribute base_name to change the default value:
def dist(ctx): ctx.base_name = 'files'
Return the patterns to exclude for finding the files in the top-level directory. Set the attribute excl to change the default value:
def dist(ctx): ctx.excl = 'build **/*.o **/*.class'
The files to package are searched automatically by waflib.Node.Node.ant_glob(). Set files to prevent this behaviour:
def dist(ctx): ctx.files = ctx.path.find_node('wscript')
The files are searched from the directory ‘base_path’, to change it, set:
def dist(ctx): ctx.base_path = path
|Return type:||list of waflib.Node.Node|
makes a tarball for redistributing the sources
Create an archive of the project, and try to build the project in a temporary directory:
$ waf distcheck
Create the archive, uncompress it and try to build the project
checks if the project compiles (tarball from ‘dist’)
updates the plugins from the waflib/extras directory
Decorator used to set the commands that can be configured automatically