Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: pylib/gyp/generator/ninja.py

Issue 10382161: Fix bug in ninja generator when there's no default action. (Closed) Base URL: http://git.chromium.org/external/gyp.git@master
Patch Set: fix other generators Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | pylib/gyp/generator/scons.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/ninja.py
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
index a3311c28ca1504a7401efd2cbb8de3299094f5c5..bd1e1698fdbc66468999314a18f9db327660352f 100644
--- a/pylib/gyp/generator/ninja.py
+++ b/pylib/gyp/generator/ninja.py
@@ -543,6 +543,9 @@ class NinjaWriter:
for rule in rules:
# First write out a rule for the rule action.
name = rule['rule_name']
+ # Skip a rule with no action and no inputs.
+ if 'action' not in rule and not rule.get('rule_sources', []):
+ continue
args = rule['action']
description = self.GenerateDescription(
'RULE',
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | pylib/gyp/generator/scons.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698