diff options
author | Steven Knight <knight@baldmt.com> | 2010-07-05 17:15:02 +0000 |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2010-07-05 17:15:02 +0000 |
commit | 31e8a06cca9560689e080c9d12c21bf1c756de51 (patch) | |
tree | a055e3398b931df58f521c6e7bc02e74ae289a09 | |
parent | 394885cc38e1146464036e24d34ebb39064ba225 (diff) | |
download | scons-31e8a06cca9560689e080c9d12c21bf1c756de51.tar.gz |
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 0795195d..0df4d370 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 b2ae4de6..c7dc474c 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) |