mirror of https://gitlab.com/ita1024/waf.git
Restore configuration values with Configure.autoconfig='clobber' #1758
This commit is contained in:
parent
dcd01d6369
commit
8120504156
|
@ -169,6 +169,7 @@ class ConfigurationContext(Context.Context):
|
|||
env = ConfigSet.ConfigSet()
|
||||
env['argv'] = sys.argv
|
||||
env['options'] = Options.options.__dict__
|
||||
env['config_cmd'] = self.cmd
|
||||
|
||||
env.run_dir = Context.run_dir
|
||||
env.top_dir = Context.top_dir
|
||||
|
|
|
@ -583,12 +583,15 @@ def autoconfigure(execute_method):
|
|||
do_config = h != env.hash
|
||||
|
||||
if do_config:
|
||||
Options.commands.insert(0, self.cmd)
|
||||
Options.commands.insert(0, 'configure')
|
||||
if Configure.autoconfig == 'clobber':
|
||||
tmp = Options.options.__dict__
|
||||
Options.options.__dict__ = env.options
|
||||
return
|
||||
|
||||
try:
|
||||
run_command(env['config_cmd'])
|
||||
finally:
|
||||
Options.options.__dict__ = tmp
|
||||
else:
|
||||
run_command(env['configure'])
|
||||
return execute_method(self)
|
||||
return execute
|
||||
Build.BuildContext.execute = autoconfigure(Build.BuildContext.execute)
|
||||
|
|
Loading…
Reference in New Issue