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

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

Issue 10447063: Fix make and ninja backends to sensibly handle duplicate target names in different directories (Closed) Base URL: http://git.chromium.org/external/gyp.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pylib/gyp/generator/ninja.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/make.py
===================================================================
--- pylib/gyp/generator/make.py (revision 1414)
+++ pylib/gyp/generator/make.py (working copy)
@@ -694,6 +694,7 @@
self.fp.write(header)
+ self.qualified_target = qualified_target
self.path = base_path
self.target = spec['target_name']
self.type = spec['type']
@@ -840,7 +841,8 @@
part_of_all: flag indicating this target is part of 'all'
"""
for action in actions:
- name = self.target + '_' + StringToMakefileVariable(action['action_name'])
+ name = StringToMakefileVariable('%s_%s' % (self.qualified_target,
+ action['action_name']))
self.WriteLn('### Rules for action "%s":' % action['action_name'])
inputs = action['inputs']
outputs = action['outputs']
@@ -934,7 +936,8 @@
part_of_all: flag indicating this target is part of 'all'
"""
for rule in rules:
- name = self.target + '_' + StringToMakefileVariable(rule['rule_name'])
+ name = StringToMakefileVariable('%s_%s' % (self.qualified_target,
+ rule['rule_name']))
count = 0
self.WriteLn('### Generated for rule %s:' % name)
@@ -1044,7 +1047,7 @@
"""
self.WriteLn('### Generated for copy rule.')
- variable = self.target + '_copies'
+ variable = StringToMakefileVariable(self.qualified_target + '_copies')
outputs = []
for copy in copies:
for path in copy['files']:
« no previous file with comments | « no previous file | pylib/gyp/generator/ninja.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698