I have a wscript
which reads some files during the configure step and based on this sets some variabales.
How do I get waf to automatically re-configure the project, if one of the configuration files change, when running waf build
instead of waf configure build
?
Consider the following scenario:
waf configure
waf build
- The content in configuration file
a.config
is changed - the user just runs
waf build
, instead ofwaf configure build
.
--> How must the wscript
look like, that it checks before running build
if the configuration files have changed, and if so, the project is reconfigured before running build
?
Example:
There is a file a.config
and the wscript
looks like this:
# wscript
def configure(conf):
a = conf.path.find_node('a.config')
conf.env.config = a.read()
def build(bld):
# check the configuration files are up to date.
# actual build
pass