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

Unified Diff: pylib/gyp/__init__.py

Issue 115922: Add a generic way for generator info to get passed to input to affect process... (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: '' Created 11 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 | « no previous file | pylib/gyp/generator/msvs.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/__init__.py
===================================================================
--- pylib/gyp/__init__.py (revision 501)
+++ pylib/gyp/__init__.py (working copy)
@@ -150,10 +150,23 @@
# because ActivePython cannot handle key parameters to __import__.
generator = __import__(generator_name, globals(), locals(), generator_name)
default_variables.update(generator.generator_default_variables)
+
+ # Fetch the generator specific info that gets fed to input, we use getattr
+ # so we can default things and the generators only have to provide what
+ # they need.
+ generator_input_info = {
+ 'generator_handles_variants':
+ getattr(generator, 'generator_handles_variants', False),
+ 'non_configuration_keys':
+ getattr(generator, 'generator_additional_non_configuration_keys', []),
+ 'path_sections':
+ getattr(generator, 'generator_additional_path_sections', []),
+ }
# Process the input specific to this generator.
[flat_list, targets, data] = gyp.input.Load(build_files, default_variables,
- includes[:], options.depth)
+ includes[:], options.depth,
+ generator_input_info)
params = {'options': options,
'build_files': build_files,
« no previous file with comments | « no previous file | pylib/gyp/generator/msvs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698