aboutsummaryrefslogtreecommitdiffstats
path: root/waflib/Scripting.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-17 17:31:04 +0100
committerDavid Robillard <d@drobilla.net>2019-03-17 18:14:27 +0100
commit8c3d48d190cb73d73891ed704c84707d16c27272 (patch)
tree89b5dd3652f1f77dbfd6819023ee3843fcea8283 /waflib/Scripting.py
parent914c4143592af494d70549ee614b578ab681450c (diff)
parent1c6fb2b3543d1229eadaa2af007383fbcf82289d (diff)
downloadserd-8c3d48d190cb73d73891ed704c84707d16c27272.tar.gz
serd-8c3d48d190cb73d73891ed704c84707d16c27272.tar.bz2
serd-8c3d48d190cb73d73891ed704c84707d16c27272.zip
Update autowaf and adapt to new API
Diffstat (limited to 'waflib/Scripting.py')
-rw-r--r--waflib/Scripting.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/waflib/Scripting.py b/waflib/Scripting.py
index 749d4f2e..ae17a8b4 100644
--- a/waflib/Scripting.py
+++ b/waflib/Scripting.py
@@ -216,7 +216,10 @@ def parse_options():
ctx = Context.create_context('options')
ctx.execute()
if not Options.commands:
- Options.commands.append(default_cmd)
+ if isinstance(default_cmd, list):
+ Options.commands.extend(default_cmd)
+ else:
+ Options.commands.append(default_cmd)
if Options.options.whelp:
ctx.parser.print_help()
sys.exit(0)
@@ -280,7 +283,7 @@ def distclean_dir(dirname):
pass
try:
- shutil.rmtree('c4che')
+ shutil.rmtree(Build.CACHE_DIR)
except OSError:
pass
@@ -598,12 +601,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)