diff options
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.py b/configure.py index 8f965c8..a719536 100755 --- a/configure.py +++ b/configure.py @@ -72,6 +72,9 @@ n.newline() 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 = [k + '=' + os.environ[k] for k in os.environ if k in env_keys] +n.variable('configure_env', ' '.join(configure_env)) n.newline() objext = '.o' @@ -351,7 +354,8 @@ n.newline() if host != 'mingw': n.comment('Regenerate build files if build script changes.') n.rule('configure', - command=options.with_python + ' configure.py $configure_args', + command='$configure_env %s configure.py $configure_args' % + options.with_python, generator=True) n.build('build.ninja', 'configure', implicit=['configure.py', 'misc/ninja_syntax.py']) |