diff options
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.py b/configure.py index 6111588..2e044c1 100755 --- a/configure.py +++ b/configure.py @@ -42,6 +42,9 @@ parser.add_option('--profile', metavar='TYPE', help='enable profiling (' + '/'.join(profilers) + ')',) parser.add_option('--with-gtest', metavar='PATH', help='use gtest unpacked in directory PATH') +parser.add_option('--with-python', metavar='EXE', + help='use EXE as the Python interpreter', + default=os.path.basename(sys.executable)) (options, args) = parser.parse_args() platform = options.platform @@ -87,7 +90,8 @@ cflags = ['-g', '-Wall', '-Wextra', '-Wno-deprecated', '-Wno-unused-parameter', '-fno-exceptions', - '-fvisibility=hidden', '-pipe'] + '-fvisibility=hidden', '-pipe', + "'-DNINJA_PYTHON=\"%s\"'" % (options.with_python,)] if not options.debug: cflags += ['-O2', '-DNDEBUG'] ldflags = ['-L$builddir'] @@ -271,7 +275,7 @@ n.newline() if host != 'mingw': n.comment('Regenerate build files if build script changes.') n.rule('configure', - command='./configure.py $configure_args', + command=options.with_python + ' configure.py $configure_args', generator=True) n.build('build.ninja', 'configure', implicit=['configure.py', 'misc/ninja_syntax.py']) |