Index: pylib/gyp/input.py |
=================================================================== |
--- pylib/gyp/input.py (revision 826) |
+++ pylib/gyp/input.py (working copy) |
@@ -95,6 +95,20 @@ |
] |
non_configuration_keys = [] |
+# Keys that do not belong inside a configuration dictionary. |
+invalid_configuration_keys = [ |
+ 'actions', |
+ 'all_dependent_settings', |
+ 'configurations', |
+ 'dependencies', |
+ 'direct_dependent_settings', |
+ 'libraries', |
+ 'link_settings', |
+ 'sources', |
+ 'target_name', |
+ 'type', |
+] |
+ |
# Controls how the generator want the build file paths. |
absolute_build_file_paths = False |
@@ -1784,7 +1798,16 @@ |
for key in delete_keys: |
del target_dict[key] |
+ # Check the configurations to see if they contain invalid keys. |
+ for configuration in target_dict['configurations'].keys(): |
+ configuration_dict = target_dict['configurations'][configuration] |
+ for key in configuration_dict.keys(): |
+ if key in invalid_configuration_keys: |
+ raise KeyError, ('%s not allowed in the %s configuration, found in ' |
+ 'target %s' % (key, configuration, target)) |
+ |
+ |
def ProcessListFiltersInDict(name, the_dict): |
"""Process regular expression and exclusion-based filters on lists. |