diff options
author | Steven Knight <knight@baldmt.com> | 2004-11-14 21:30:31 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-11-14 21:30:31 (GMT) |
commit | 2258ba9c42658ad9da2ad0cc96e4ae2abc9bc0e8 (patch) | |
tree | 4a78aa2a0fba4dee83bc1b5f653e25f17714db3e /src | |
parent | 20ab94bd509cc21af7d7f038593ac479245be2aa (diff) | |
download | SCons-2258ba9c42658ad9da2ad0cc96e4ae2abc9bc0e8.zip SCons-2258ba9c42658ad9da2ad0cc96e4ae2abc9bc0e8.tar.gz SCons-2258ba9c42658ad9da2ad0cc96e4ae2abc9bc0e8.tar.bz2 |
Support override expansions within target and source files names.
Diffstat (limited to 'src')
-rw-r--r-- | src/CHANGES.txt | 3 | ||||
-rw-r--r-- | src/engine/SCons/Environment.py | 8 | ||||
-rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 6 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 003163b..4755f18 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -127,6 +127,9 @@ RELEASE 0.97 - XXX - Allow Aliases to have actions that will be executed whenever any of the expanded Alias targets are out of date. + - Fix expansion of env.Command() overrides within target and + source file names. + From Wayne Lee: - Avoid "maximum recursion limit" errors when removing $(-$) pairs diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index ef3b2d0..740297b 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -1135,11 +1135,9 @@ class Base: source files using the supplied action. Action may be any type that the Builder constructor will accept for an action.""" - nkw = self.subst_kw(kw) - nkw['action'] = action - nkw['source_factory'] = self.fs.Entry - bld = apply(SCons.Builder.Builder, (), nkw) - return bld(self, target, source) + bld = SCons.Builder.Builder(action = action, + source_factory = self.fs.Entry) + return apply(bld, (self, target, source), kw) def Depends(self, target, dependency): """Explicity specify that 'target's depend on 'dependency'.""" diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 9b84f3c..4c9a0be 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -1995,6 +1995,12 @@ f5: \ t.build() assert x[0] == 'magic word', x + t = env.Command(target='${X}.out', source='${X}.in', + action = 'foo', + X = 'xxx')[0] + assert str(t) == 'xxx.out', str(t) + assert 'xxx.in' in map(lambda x: x.path, t.sources) + def test_Configure(self): """Test the Configure() method""" # Configure() will write to a local temporary file. |