diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2010-01-23 15:07:01 +0100 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2010-01-23 15:07:01 +0100 |
commit | 5d815f9314d2a12f7e92e9cec33f0a9cf6b14883 (patch) | |
tree | 1db5deb3a8e5075d9a8abe3aae576ae00bab8e56 /engine/SCons/Action.py | |
parent | bb7273665583fda5d0ddb30e969718984ea4c205 (diff) | |
parent | 7764805dd1d4df1cf1bdfe2ad1f2e130d91f515a (diff) |
Merge commit 'upstream/1.2.0.d20100117'
Diffstat (limited to 'engine/SCons/Action.py')
-rw-r--r-- | engine/SCons/Action.py | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/engine/SCons/Action.py b/engine/SCons/Action.py index ec12a66..367bf46 100644 --- a/engine/SCons/Action.py +++ b/engine/SCons/Action.py @@ -76,7 +76,7 @@ way for wrapping up the functions. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -97,7 +97,7 @@ way for wrapping up the functions. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Action.py 4577 2009/12/27 19:43:56 scons" +__revision__ = "src/engine/SCons/Action.py 4629 2010/01/17 22:23:21 scons" import cPickle import dis @@ -430,7 +430,7 @@ class ActionBase: # This should never happen, as the Action() factory should wrap # the varlist, but just in case an action is created directly, # we duplicate this check here. - vl = self.varlist + vl = self.get_varlist(target, source, env) if is_String(vl): vl = (vl,) for v in vl: result.append(env.subst('${'+v+'}')) @@ -454,6 +454,9 @@ class ActionBase: self.presub_env = None # don't need this any more return lines + def get_varlist(self, target, source, env, executor=None): + return self.varlist + def get_targets(self, env, executor): """ Returns the type of targets ($TARGETS, $CHANGED_TARGETS) used @@ -897,6 +900,9 @@ class CommandGeneratorAction(ActionBase): def get_implicit_deps(self, target, source, env, executor=None): return self._generate(target, source, env, 1, executor).get_implicit_deps(target, source, env) + def get_varlist(self, target, source, env, executor=None): + return self._generate(target, source, env, 1, executor).get_varlist(target, source, env, executor) + def get_targets(self, env, executor): return self._generate(None, None, env, 1, executor).get_targets(env, executor) @@ -958,6 +964,9 @@ class LazyAction(CommandGeneratorAction, CommandAction): c = self.get_parent_class(env) return c.get_presig(self, target, source, env) + def get_varlist(self, target, source, env, executor=None): + c = self.get_parent_class(env) + return c.get_varlist(self, target, source, env, executor) class FunctionAction(_ActionAction): @@ -1139,6 +1148,13 @@ class ListAction(ActionBase): result.extend(act.get_implicit_deps(target, source, env)) return result + def get_varlist(self, target, source, env, executor=None): + result = SCons.Util.OrderedDict() + for act in self.list: + for var in act.get_varlist(target, source, env, executor): + result[var] = True + return result.keys() + class ActionCaller: """A class for delaying calling an Action function with specific (positional and keyword) arguments until the Action is actually |