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

Unified Diff: SConstruct

Issue 60046: Apply Lei Zhang's patch to add easy import of additional environment... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: SConstruct
===================================================================
--- SConstruct (revision 1668)
+++ SConstruct (working copy)
@@ -508,6 +508,7 @@
result.Add('mode', 'compilation mode (debug, release)', 'release')
result.Add('sample', 'build sample (shell, process)', '')
result.Add('env', 'override environment settings (NAME1:value1,NAME2:value2)', '')
+ result.Add('importenv', 'import environment settings (NAME1,NAME2)', '')
Kevin Millikin (Chromium) 2009/04/02 12:54:11 Might be clearer to have the message string: 'imp
for (name, option) in SIMPLE_OPTIONS.iteritems():
help = '%s (%s)' % (name, ", ".join(option['values']))
result.Add(name, help, option.get('default'))
@@ -626,9 +627,13 @@
options['arch'] = options['simulator']
-def ParseEnvOverrides(arg):
+def ParseEnvOverrides(arg, imports):
# The environment overrides are in the format NAME1:value1,NAME2:value2
+ # The environment imports are in the format NAME1,NAME2
Kevin Millikin (Chromium) 2009/04/02 12:54:11 Analogously here.
overrides = {}
+ for var in imports.split(','):
+ if var in os.environ:
+ overrides[var] = os.environ[var]
for override in arg.split(','):
pos = override.find(':')
if pos == -1:
@@ -726,7 +731,7 @@
env = Environment(options=opts)
Help(opts.GenerateHelpText(env))
VerifyOptions(env)
- env_overrides = ParseEnvOverrides(env['env'])
+ env_overrides = ParseEnvOverrides(env['env'], env['importenv'])
SourceSignatures(env['sourcesignatures'])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698