From: g0dil Date: Fri, 13 Aug 2010 13:04:45 +0000 (+0000) Subject: Add support for multiple VAR+=VALUE arguments X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=73c33f663ff0f65e4656ea5a5f6f07a43a2e1722;p=senf.git Add support for multiple VAR+=VALUE arguments git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1686 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/site_scons/senfutil.py b/site_scons/senfutil.py index 331b3a8..3061ab9 100644 --- a/site_scons/senfutil.py +++ b/site_scons/senfutil.py @@ -26,7 +26,8 @@ def parseArguments(env, *defs): env.Help(""" Any construction environment variable may be set from the scons command line (see SConstruct file and SCons documentation for a list -of variables) using +of variables) usin +g VARNAME=value Assign new value VARNAME+=value Append value at end @@ -37,7 +38,8 @@ Special command line parameters: try : unknv = vars.UnknownVariables() except AttributeError: unknv = vars.UnknownOptions() env.SetDefault(ARGUMENT_VARIABLES = {}) - for k,v in unknv.iteritems(): + for k,v in ARGLIST: + if not unknv.has_key(k) : continue if k.endswith('+'): env.Append(**{k[:-1]: v}) env.Append(ARGUMENT_VARIABLES = {k[:-1]:v})