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

Unified Diff: pylib/gyp/input.py

Issue 12063003: Added new command line option: --allow-duplicate-basenames (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 10 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/__init__.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/input.py
===================================================================
--- pylib/gyp/input.py (revision 1565)
+++ pylib/gyp/input.py (working copy)
@@ -2517,7 +2517,7 @@
def Load(build_files, variables, includes, depth, generator_input_info, check,
- circular_check, parallel):
+ circular_check, allow_duplicates, parallel):
# Set up path_sections and non_configuration_keys with the default data plus
# the generator-specifc data.
global path_sections
@@ -2655,12 +2655,19 @@
# Also validate actions and run_as elements in targets.
for target in flat_list:
target_dict = targets[target]
+ target_variables = {}
+ if 'variables' in target_dict:
+ target_variables = target_dict['variables']
Sam Clegg 2013/02/09 17:52:47 You can just do: target_variables = target_dict.g
build_file = gyp.common.BuildFile(target)
ValidateTargetType(target, target_dict)
- # TODO(thakis): Get vpx_scale/arm/scalesystemdependent.c to be renamed to
- # scalesystemdependent_arm_additions.c or similar.
- if 'arm' not in variables.get('target_arch', ''):
- ValidateSourcesInTarget(target, target_dict, build_file)
+ allow_duplicates_variable = False
+ if target_variables and 'allow_duplicate_basenames' in target_variables:
+ allow_duplicates_variable = target_variables['allow_duplicate_basenames']
Sam Clegg 2013/02/09 17:52:47 You can just do: allow_duplicates_variable = targ
+ if not (allow_duplicates or allow_duplicates_variable):
+ # TODO(thakis): Get vpx_scale/arm/scalesystemdependent.c to be renamed to
+ # scalesystemdependent_arm_additions.c or similar.
+ if 'arm' not in variables.get('target_arch', ''):
+ ValidateSourcesInTarget(target, target_dict, build_file)
Sam Clegg 2013/02/09 17:52:47 Seems like it would be nice to remove this TODO, a
ValidateRulesInTarget(target, target_dict, extra_sources_for_rules)
ValidateRunAsInTarget(target, target_dict, build_file)
ValidateActionsInTarget(target, target_dict, build_file)
« no previous file with comments | « pylib/gyp/__init__.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698