diff options
author | Evan Martin <martine@danga.com> | 2012-06-07 23:03:01 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-06-07 23:03:01 (GMT) |
commit | 62d3b116bb93360bc13600e2ab972504a958d476 (patch) | |
tree | 6b37302cf5c6afac69e7fca1be08ae5bf2b0c74f | |
parent | 54553d3f44dd187dca65677532f99a5458b8c802 (diff) | |
parent | b4c27cba474e9820f47624d5ccde38c64414d55c (diff) | |
download | Ninja-62d3b116bb93360bc13600e2ab972504a958d476.zip Ninja-62d3b116bb93360bc13600e2ab972504a958d476.tar.gz Ninja-62d3b116bb93360bc13600e2ab972504a958d476.tar.bz2 |
Merge pull request #306 from nico/winunbreakconf
Strip leading whitespace from commands on Windows.
-rwxr-xr-x | configure.py | 7 |
1 files 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', |