Skip to content

Commit

Permalink
Fix configure.py on windows, which does not permit a leading space.
Browse files Browse the repository at this point in the history
  • Loading branch information
nico committed Jun 5, 2012
1 parent 54553d3 commit b4c27cb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions configure.py
Expand Up @@ -74,8 +74,9 @@
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++')
Expand Down Expand Up @@ -362,7 +363,7 @@ def binary(name):
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',
Expand Down

0 comments on commit b4c27cb

Please sign in to comment.