Table of Contents
It is not possible to use several Waf instances concurrently over the same build folder. Yet, several Waf instances may use the project at the same time. For this, two options must be set:
Here is an example for a simple project located in /tmp/smallfolder:
srcdir = '.'
blddir = 'out_directory'
def configure(conf):
pass
def build(bld):
bld(rule='touch ${TGT}', target='foo.txt')
Upon execution, the results will be the following:
$ export WAFLOCK=.lock-debug$ waf distclean configure -b debug
'distclean' finished successfully (0.002s) 'configure' finished successfully (0.001s) $ waf Waf: Entering directory `/tmp/smallproject/debug' [1/1] foo.txt: -> debug/default/foo.txt
Waf: Leaving directory `/tmp/smallproject/debug' 'build' finished successfully (0.012s) $ export WAFLOCK=.lock-release $ waf distclean configure -b release 'distclean' finished successfully (0.001s) 'configure' finished successfully (0.176s) $ waf Waf: Entering directory `/tmp/smallproject/release'
[1/1] foo.txt: -> release/default/foo.txt Waf: Leaving directory `/tmp/smallproject/release' 'build' finished successfully (0.034s) $ tree -a . |-- .lock-debug
|-- .lock-release |-- debug | |-- .wafpickle-7 | |-- c4che | | |-- build.config.py | | `-- default.cache.py | |-- config.log | `-- default | `-- foo.txt |-- release | |-- .wafpickle-7 | |-- c4che | | |-- build.config.py | | `-- default.cache.py | |-- config.log | `-- default | `-- foo.txt `-- wscript
The environment variable WAFLOCK points at the configuration of the project in use. | |
The lockfile is created during the configuration. | |
The files are output in the build directory | |
The configuration release is used with a different lock file and a different build directory. | |
The contents of the project directory contain the two lock files and the two build folders. |