Module called for configuring, compiling and installing targets
This is the main entry point, all Waf execution starts here.
Parameters: |
|
---|
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.
Parameters: | file_path (string) – absolute path representing the top-level wscript file |
---|
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().
Parameters: | cmd_name (string) – command to execute, like build |
---|
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
Parameters: | dirname (string) – absolute path of the folder to clean |
---|
Bases: waflib.Context.Context
Create an archive containing the project source code:
$ waf dist
return the path to use for a node in the tar archive, the purpose of this is to let subclases resolve symbolic links or to change file names
Add a file to the tar archive. Transform symlinks into files if the files lie out of the project tree.
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 type: | string |
---|
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 type: | string |
---|
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'
Return type: | string |
---|
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 |
---|
Bases: waflib.Scripting.Dist
Create an archive of the project, and try to build the project in a temporary directory:
$ waf distcheck