summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-12-16 13:29:10 (GMT)
committerSteven Knight <knight@baldmt.com>2004-12-16 13:29:10 (GMT)
commita8786adaf4357dea8e6166ff0773c5a396295ccd (patch)
tree2de4188ab5c2719a9b61289dcd49578702552b3e
parentac4c015555735689b7c3feb0c274c5a4887fc294 (diff)
downloadSCons-a8786adaf4357dea8e6166ff0773c5a396295ccd.zip
SCons-a8786adaf4357dea8e6166ff0773c5a396295ccd.tar.gz
SCons-a8786adaf4357dea8e6166ff0773c5a396295ccd.tar.bz2
Restore older recipe for creating env.Command() builders while a better solution is coded.
-rw-r--r--src/engine/SCons/Environment.py8
-rw-r--r--src/engine/SCons/EnvironmentTests.py7
-rw-r--r--test/Scanner.py14
3 files changed, 10 insertions, 19 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index d973a01..ca543bd 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -1141,12 +1141,8 @@ class Base:
source files using the supplied action. Action may
be any type that the Builder constructor will accept
for an action."""
- builder_kw = {
- 'action' : action,
- 'source_factory' : self.fs.Entry,
- }
- builder_kw.update(kw)
- bld = apply(SCons.Builder.Builder, (), builder_kw)
+ bld = SCons.Builder.Builder(action = action,
+ source_factory = self.fs.Entry)
return apply(bld, (self, target, source), kw)
def Depends(self, target, dependency):
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 56c42cb..71383e7 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -2001,13 +2001,6 @@ f5: \
assert str(t) == 'xxx.out', str(t)
assert 'xxx.in' in map(lambda x: x.path, t.sources)
- # Make sure we can use Builder keyword arguments
- # on Command() calls.
- env.Command(target='mmm.out', source='mmm.1.in',
- action='multibuild', multi=1)
- env.Command(target='mmm.out', source='mmm.2.in',
- action='multibuild', multi=1)
-
def test_Configure(self):
"""Test the Configure() method"""
# Configure() will write to a local temporary file.
diff --git a/test/Scanner.py b/test/Scanner.py
index 7936e59..6e64c03 100644
--- a/test/Scanner.py
+++ b/test/Scanner.py
@@ -88,6 +88,7 @@ k2scan = env.Scanner(name = 'k2',
##########################################################
# Test scanner as found automatically from the environment
+# (backup_source_scanner)
env = Environment()
env.Append(SCANNERS = kscan)
@@ -102,15 +103,16 @@ env2.Append(SCANNERS = [k2scan])
env2.Command('junk', 'junk.k2', r'%(python)s build.py $SOURCES $TARGET')
##########################################################
-# Test specifying a specific source scanner for a Builder
+# Test specifying a specific source scanner for a target Node
-bar = env.Command('bar', 'bar.in',
- r'%(python)s build.py $SOURCES $TARGET',
- source_scanner=kscan)
+barbld = Builder(action=r'%(python)s build.py $SOURCES $TARGET',
+ source_scanner=kscan)
+env.Append(BUILDERS={'BarBld':barbld})
+bar = env.BarBld(target='bar', source='bar.in')
##########################################################
-# Test specifying a source scanner for an intermediary Builder to
-# ensure that the right scanner gets used for the right nodes.
+# Test specifying a source scanner for a Builder that gets
+# automatically applied to targets generated from that Builder
import string