From d3135e0f57ffece13c70160606250006cd097c17 Mon Sep 17 00:00:00 2001 From: Timothy J Fontaine Date: Wed, 22 Aug 2012 16:36:04 -0400 Subject: [PATCH] build: add configure option to build with ninja --- configure | 9 ++++++++- tools/gyp_node | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 22537d56d4e751..3bf9b04879ec06 100755 --- a/configure +++ b/configure @@ -165,6 +165,11 @@ parser.add_option("--with-arm-float-abi", help="Specifies which floating-point ABI to use. Valid values are: " "soft, softfp, hard") +parser.add_option("--ninja", + action="store_true", + dest="ninja_build", + help="Generate files for the ninja build system") + (options, args) = parser.parse_args() @@ -457,7 +462,9 @@ write('config.gypi', "# Do not edit. Generated by the configure script.\n" + write('config.mk', "# Do not edit. Generated by the configure script.\n" + ("BUILDTYPE=%s\n" % ('Debug' if options.debug else 'Release'))) -if os.name == 'nt': +if options.ninja_build: + gyp_args = ['-f', 'ninja'] +elif os.name == 'nt': gyp_args = ['-f', 'msvs', '-G', 'msvs_version=2010'] else: gyp_args = ['-f', 'make'] diff --git a/tools/gyp_node b/tools/gyp_node index 5c4882f4f23156..7b495055c180c8 100755 --- a/tools/gyp_node +++ b/tools/gyp_node @@ -44,8 +44,7 @@ if __name__ == '__main__': args.append('--depth=' + node_root) # There's a bug with windows which doesn't allow this feature. - if sys.platform != 'win32': - + if sys.platform != 'win32' and 'ninja' not in args: # Tell gyp to write the Makefiles into output_dir args.extend(['--generator-output', output_dir])