Index: pylib/gyp/generator/ninja.py |
=================================================================== |
--- pylib/gyp/generator/ninja.py (revision 1791) |
+++ pylib/gyp/generator/ninja.py (working copy) |
@@ -1656,9 +1656,8 @@ |
toplevel_build = os.path.join(options.toplevel_dir, build_dir) |
- master_ninja = ninja_syntax.Writer( |
- OpenOutput(os.path.join(toplevel_build, 'build.ninja')), |
- width=120) |
+ master_ninja_file = OpenOutput(os.path.join(toplevel_build, 'build.ninja')) |
+ master_ninja = ninja_syntax.Writer(master_ninja_file, width=120) |
# Put build-time support tools in out/{config_name}. |
gyp.common.CopyTool(flavor, toplevel_build) |
@@ -2098,7 +2097,9 @@ |
master_ninja.build('all', 'phony', list(all_outputs)) |
master_ninja.default(generator_flags.get('default_target', 'all')) |
+ master_ninja_file.close() |
+ |
def PerformBuild(data, configurations, params): |
options = params['options'] |
for config in configurations: |