From b4c27cba474e9820f47624d5ccde38c64414d55c Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Mon, 4 Jun 2012 20:23:14 -0700 Subject: Fix configure.py on windows, which does not permit a leading space. --- configure.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.py b/configure.py index 312fbcb..f733d91 100755 --- a/configure.py +++ b/configure.py @@ -74,8 +74,9 @@ n.comment('The arguments passed to configure.py, for rerunning it.') n.variable('configure_args', ' '.join(sys.argv[1:])) env_keys = set(['CXX', 'AR', 'CFLAGS', 'LDFLAGS']) configure_env = dict((k, os.environ[k]) for k in os.environ if k in env_keys) -n.variable('configure_env', - ' '.join([k + '=' + configure_env[k] for k in configure_env])) +if configure_env: + config_str = ' '.join([k + '=' + configure_env[k] for k in configure_env]) + n.variable('configure_env', config_str + '$ ') n.newline() CXX = configure_env.get('CXX', 'g++') @@ -362,7 +363,7 @@ n.newline() if host != 'mingw': n.comment('Regenerate build files if build script changes.') n.rule('configure', - command='$configure_env %s configure.py $configure_args' % + command='${configure_env}%s configure.py $configure_args' % options.with_python, generator=True) n.build('build.ninja', 'configure', -- cgit v0.12