summaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py7
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',