diff options
author | Steven Knight <knight@baldmt.com> | 2010-07-05 17:15:02 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2010-07-05 17:15:02 (GMT) |
commit | 9cd3bd61a426a2c1dad2fb0c6a52d08f56493c02 (patch) | |
tree | a055e3398b931df58f521c6e7bc02e74ae289a09 | |
parent | 8b69585750cb1874419a084a81d809fce009c839 (diff) | |
download | SCons-9cd3bd61a426a2c1dad2fb0c6a52d08f56493c02.zip SCons-9cd3bd61a426a2c1dad2fb0c6a52d08f56493c02.tar.gz SCons-9cd3bd61a426a2c1dad2fb0c6a52d08f56493c02.tar.bz2 |
Fix substitution in command-line actions created by the global Alias() function.
-rw-r--r-- | src/CHANGES.txt | 2 | ||||
-rw-r--r-- | src/engine/SCons/Environment.py | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 0795195..0df4d37 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -44,6 +44,8 @@ RELEASE 2.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE - Fix explicit dependencies (Depends()) on Nodes that don't have attached Builders. + - Fix use of the global Alias() function with command actions. + From Matt Hughes: - Fix the ability to append to default $*FLAGS values (which are diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index b2ae4de..c7dc474 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -2285,6 +2285,12 @@ def NoSubstitutionProxy(subject): return getattr(self.__dict__['__subject'], name) def __setattr__(self, name, value): return setattr(self.__dict__['__subject'], name, value) + def executor_to_lvars(self, kwdict): + if kwdict.has_key('executor'): + kwdict['lvars'] = kwdict['executor'].get_lvars() + del kwdict['executor'] + else: + kwdict['lvars'] = {} def raw_to_mode(self, dict): try: raw = dict['raw'] @@ -2301,12 +2307,14 @@ def NoSubstitutionProxy(subject): nargs = (string, self,) + args nkw = kwargs.copy() nkw['gvars'] = {} + self.executor_to_lvars(nkw) self.raw_to_mode(nkw) return SCons.Subst.scons_subst_list(*nargs, **nkw) def subst_target_source(self, string, *args, **kwargs): nargs = (string, self,) + args nkw = kwargs.copy() nkw['gvars'] = {} + self.executor_to_lvars(nkw) self.raw_to_mode(nkw) return SCons.Subst.scons_subst(*nargs, **nkw) return _NoSubstitutionProxy(subject) |