diff options
author | Steven Knight <knight@baldmt.com> | 2004-01-08 06:06:09 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-01-08 06:06:09 (GMT) |
commit | 57e7aacdc3ff2a09d264623a09f734859c498688 (patch) | |
tree | 6d5bbed7df022b6704c95f9469a70605e923c61f /src | |
parent | e3b97c91b2dabc61dae0e58030e5545766d124ab (diff) | |
download | SCons-57e7aacdc3ff2a09d264623a09f734859c498688.zip SCons-57e7aacdc3ff2a09d264623a09f734859c498688.tar.gz SCons-57e7aacdc3ff2a09d264623a09f734859c498688.tar.bz2 |
Make Action() and env.Action() equivalent.
Diffstat (limited to 'src')
-rw-r--r-- | src/CHANGES.txt | 3 | ||||
-rw-r--r-- | src/engine/SCons/Environment.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 6 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 249b078..222e0eb 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -109,6 +109,9 @@ RELEASE 0.95 - XXX - Fix calling Configure() from more than one subsidiary SConscript file. + - Fix the env.Action() method so it returns the correct type of + Action for its argument(s). + From Vincent Risi: - Add support for the bcc32, ilink32 and tlib Borland tools. diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 6afa69f..02f2f33 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -702,7 +702,7 @@ class Base: ####################################################################### def Action(self, *args, **kw): - nargs = self.subst_list(args) + nargs = self.subst(args) nkw = self.subst_kw(kw) return apply(SCons.Action.Action, nargs, nkw) diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 778b2f8..4e0b380 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -1252,21 +1252,27 @@ class EnvironmentTestCase(unittest.TestCase): def test_Action(self): """Test the Action() method""" + import SCons.Action + env = Environment(FOO = 'xyzzy') a = env.Action('foo') assert a, a + assert a.__class__ is SCons.Action.CommandAction, a a = env.Action('$FOO') assert a, a + assert a.__class__ is SCons.Action.CommandGeneratorAction, a a = env.Action(['$FOO', 'foo']) assert a, a + assert a.__class__ is SCons.Action.ListAction, a def func(arg): pass a = env.Action(func) assert a, a + assert a.__class__ is SCons.Action.FunctionAction, a def test_AddPostAction(self): """Test the AddPostAction() method""" |