summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools')
-rwxr-xr-xBuildTools/scons2ninja.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/BuildTools/scons2ninja.py b/BuildTools/scons2ninja.py
index 1af52d7..98b3518 100755
--- a/BuildTools/scons2ninja.py
+++ b/BuildTools/scons2ninja.py
@@ -322,6 +322,7 @@ ninja.rule('ibtool',
ninja.rule('generator',
command = "python " + SCRIPT + " ${scons_args}",
+ depfile = ".scons2ninja.deps",
pool = 'scons_pool',
generator = '1',
description = 'Regenerating build.ninja')
@@ -566,7 +567,7 @@ for line in build_lines :
ninja.build('_generated_headers', 'phony', ninja.header_targets())
# Regenerate build.ninja file
-ninja.build('build.ninja', 'generator', [], deps = [SCRIPT, CONFIGURATION_FILE] + scons_dependencies)
+ninja.build('build.ninja', 'generator', [], deps = [SCRIPT, CONFIGURATION_FILE])
# Header & variables
ninja.header("# This file is generated by " + SCRIPT)
@@ -584,6 +585,10 @@ if 'ninja_post' in dir() :
# Result
################################################################################
+f = open(".scons2ninja.deps", "w")
+f.write("build.ninja: " + " ".join([d for d in scons_dependencies if os.path.exists(d)]) + "\n")
+f.close()
+
f = open("build.ninja", "w")
f.write(ninja.serialize())
f.close()