Commit 4255b51d authored by Emmanuele Bassi's avatar Emmanuele Bassi

Check for Ninja first

Some projects do not use Autotools, but still provide a Makefile. If we
don't find a Ninja build rules file, let's fall back to the previous
behaviour.
parent 7480e84e
......@@ -213,25 +213,25 @@ def main(args):
use_ninja = False
buildfile_path = None
for name in ['Makefile', 'makefile', 'GNUmakefile']:
for name in ['build.ninja']:
buildfile_path = os.path.join(builddir, name)
if os.path.exists(buildfile_path):
use_make = True
use_ninja = True
break
for name in ['build.ninja']:
for name in ['Makefile', 'makefile', 'GNUmakefile']:
buildfile_path = os.path.join(builddir, name)
if os.path.exists(buildfile_path):
use_ninja = True
use_make = True
break
if buildfile_path is None:
fatal("No build rules file found")
if use_make:
args = list(makeargs)
else:
if use_ninja:
args = list(ninjaargs)
else:
args = list(makeargs)
user_specified_jobs = False
for arg in args:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment