diff options
author | Remko Tronçon <git@el-tramo.be> | 2013-08-16 18:39:52 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-08-16 19:02:28 (GMT) |
commit | ac6ff12e174b832326c6d89784d4c5e53044eecf (patch) | |
tree | baa8696c51b28c441f296e79e403079edde99145 /BuildTools | |
parent | fe32a6d90bd0b4f931bdfce91d3a982b5fbc599d (diff) | |
download | swift-ac6ff12e174b832326c6d89784d4c5e53044eecf.zip swift-ac6ff12e174b832326c6d89784d4c5e53044eecf.tar.bz2 |
Make missing SConstruct dependencies non-fatal for Ninja build.
Change-Id: Id11311c9fca7b7baa3d02e3ebce62deadc5a7de5
Diffstat (limited to 'BuildTools')
-rwxr-xr-x | BuildTools/scons2ninja.py | 7 |
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() |