mirror of https://gitlab.com/ita1024/waf.git
Restore original launch_dir on autoconfigure to correctly parse cli options
This commit is contained in:
parent
314bd31e6a
commit
4611188e90
|
@ -180,6 +180,7 @@ class ConfigurationContext(Context.Context):
|
|||
env.hash = self.hash
|
||||
env.files = self.files
|
||||
env.environ = dict(self.environ)
|
||||
env.launch_dir = Context.launch_dir
|
||||
|
||||
if not (self.env.NO_LOCK_IN_RUN or env.environ.get('NO_LOCK_IN_RUN') or getattr(Options.options, 'no_lock_in_run')):
|
||||
env.store(os.path.join(Context.run_dir, Options.lockfile))
|
||||
|
|
|
@ -598,12 +598,15 @@ def autoconfigure(execute_method):
|
|||
cmd = env.config_cmd or 'configure'
|
||||
if Configure.autoconfig == 'clobber':
|
||||
tmp = Options.options.__dict__
|
||||
launch_dir_tmp = Context.launch_dir
|
||||
if env.options:
|
||||
Options.options.__dict__ = env.options
|
||||
Context.launch_dir = env.launch_dir
|
||||
try:
|
||||
run_command(cmd)
|
||||
finally:
|
||||
Options.options.__dict__ = tmp
|
||||
Context.launch_dir = launch_dir_tmp
|
||||
else:
|
||||
run_command(cmd)
|
||||
run_command(self.cmd)
|
||||
|
|
Loading…
Reference in New Issue