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

Side by Side 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, 6 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 unified diff | Download patch
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | pylib/gyp/generator/scons.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import copy 5 import copy
6 import gyp 6 import gyp
7 import gyp.common 7 import gyp.common
8 import gyp.msvs_emulation 8 import gyp.msvs_emulation
9 import gyp.MSVSVersion 9 import gyp.MSVSVersion
10 import gyp.system_test 10 import gyp.system_test
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 self.ninja.newline() 536 self.ninja.newline()
537 537
538 return all_outputs 538 return all_outputs
539 539
540 def WriteRules(self, rules, extra_sources, prebuild, 540 def WriteRules(self, rules, extra_sources, prebuild,
541 extra_mac_bundle_resources): 541 extra_mac_bundle_resources):
542 all_outputs = [] 542 all_outputs = []
543 for rule in rules: 543 for rule in rules:
544 # First write out a rule for the rule action. 544 # First write out a rule for the rule action.
545 name = rule['rule_name'] 545 name = rule['rule_name']
546 # Skip a rule with no action and no inputs.
547 if 'action' not in rule and not rule.get('rule_sources', []):
548 continue
546 args = rule['action'] 549 args = rule['action']
547 description = self.GenerateDescription( 550 description = self.GenerateDescription(
548 'RULE', 551 'RULE',
549 rule.get('message', None), 552 rule.get('message', None),
550 ('%s ' + generator_default_variables['RULE_INPUT_PATH']) % name) 553 ('%s ' + generator_default_variables['RULE_INPUT_PATH']) % name)
551 is_cygwin = (self.msvs_settings.IsRuleRunUnderCygwin(rule) 554 is_cygwin = (self.msvs_settings.IsRuleRunUnderCygwin(rule)
552 if self.flavor == 'win' else False) 555 if self.flavor == 'win' else False)
553 args = [self.msvs_settings.ConvertVSMacros(arg, self.base_to_build) 556 args = [self.msvs_settings.ConvertVSMacros(arg, self.base_to_build)
554 for arg in args] if self.flavor == 'win' else args 557 for arg in args] if self.flavor == 'win' else args
555 rule_name = self.WriteNewNinjaRule(name, args, description, is_cygwin) 558 rule_name = self.WriteNewNinjaRule(name, args, description, is_cygwin)
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 1531
1529 user_config = params.get('generator_flags', {}).get('config', None) 1532 user_config = params.get('generator_flags', {}).get('config', None)
1530 if user_config: 1533 if user_config:
1531 GenerateOutputForConfig(target_list, target_dicts, data, params, 1534 GenerateOutputForConfig(target_list, target_dicts, data, params,
1532 user_config) 1535 user_config)
1533 else: 1536 else:
1534 config_names = target_dicts[target_list[0]]['configurations'].keys() 1537 config_names = target_dicts[target_list[0]]['configurations'].keys()
1535 for config_name in config_names: 1538 for config_name in config_names:
1536 GenerateOutputForConfig(target_list, target_dicts, data, params, 1539 GenerateOutputForConfig(target_list, target_dicts, data, params,
1537 config_name) 1540 config_name)
OLDNEW
« 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