diff options
Diffstat (limited to 'site_scons/site_tools/ninja.py')
-rw-r--r-- | site_scons/site_tools/ninja.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/site_scons/site_tools/ninja.py b/site_scons/site_tools/ninja.py index 97b9d25665f..5c1af72db2b 100644 --- a/site_scons/site_tools/ninja.py +++ b/site_scons/site_tools/ninja.py @@ -1498,7 +1498,6 @@ def generate(env): ninja_file_name = env.subst("${NINJA_PREFIX}.${NINJA_SUFFIX}") ninja_file = env.Ninja(target=ninja_file_name, source=[]) env.AlwaysBuild(ninja_file) - env.Alias("$NINJA_ALIAS_NAME", ninja_file) # TODO: API for getting the SConscripts programmatically # exists upstream: https://github.com/SCons/scons/issues/3625 @@ -1618,6 +1617,12 @@ def generate(env): if not exists(env): return + # There is a target called generate-ninja which needs to be included + # with the --ninja flag in order to generate the ninja file. Because the --ninja + # flag is ONLY used with generate-ninja, we have combined the two by making the --ninja flag + # implicitly build the generate-ninja target. + SCons.Script.BUILD_TARGETS = SCons.Script.TargetList(env.Alias("$NINJA_ALIAS_NAME", ninja_file)) + # Set a known variable that other tools can query so they can # behave correctly during ninja generation. env["GENERATING_NINJA"] = True |