which exists outside of any file system.
This Node object, or the alias name,
may be used as a dependency of any other target,
-including another alias.
+including another alias. Alias can be called multiple times for the same
+alias to add additional targets to the alias.
.ES
env.Alias('install', ['/usr/local/bin', '/usr/local/lib'])
+env.Alias('install', ['/usr/local/man'])
.EE
.TP
(see the next section);
or a list of any of the above.
+.IP multi
+Specifies whether this builder is allowed to be called multiple times for
+the same target file(s). The default is 0, which means the builder
+can not be called multiple times for the same target file(s). Calling a
+builder multiple times for the same target simply adds additional source
+files to the target; it is not allowed to change the environment associated
+with the target, specify addition build arguments, or associate a different
+builder with the target.
+
.IP prefix
The prefix that will be prepended to the target file name.
The value may also be a function call
return
return 1
+def match_re_dotall(lines = None, res = None):
+ """
+ """
+ if not type(lines) is type(""):
+ lines = join(lines, "\n")
+ if not type(res) is type(""):
+ res = join(res, "\n")
+ if re.compile("^" + res + "$", re.DOTALL).match(lines):
+ return 1
+
class TestCmd:
"""Class TestCmd
"""
RELEASE 0.08 -
+ From Anthony Roach:
+
+ - Add a "multi" keyword argument to Builder creation that specifies
+ it's okay to call the builder multiple times for a target.
+
+ - Set a "multi" on Aliases so multiple calls will append to an Alias.
+
From Zed Shaw:
- Add an Append() method to Environments, to append values to
else:
return apply(BuilderBase, (), kw)
-def _init_nodes(builder, env, tlist, slist):
+def _init_nodes(builder, env, args, tlist, slist):
"""Initialize lists of target and source nodes with all of
the proper Builder information.
"""
+
for s in slist:
src_key = s.scanner_key() # the file suffix
scanner = env.get_scanner(src_key)
if scanner:
s.source_scanner = scanner
-
+
for t in tlist:
- t.cwd = SCons.Node.FS.default_fs.getcwd() # XXX
+ if t.builder is not None:
+ if t.env != env:
+ raise UserError, "Two different environments were specified for the same target: %s"%str(t)
+ elif t.build_args != args:
+ raise UserError, "Two different sets of build arguments were specified for the same target: %s"%str(t)
+ elif builder.scanner and builder.scanner != t.target_scanner:
+ raise UserError, "Two different scanners were specified for the same target: %s"%str(t)
+
+ if builder.multi:
+ if t.builder != builder:
+ if isinstance(t.builder, ListBuilder) and isinstance(builder, ListBuilder) and t.builder.builder == builder.builder:
+ raise UserError, "Two different target sets have a target in common: %s"%str(t)
+ else:
+ raise UserError, "Two different builders (%s and %s) were specified for the same target: %s"%(t.builder.name, builder.name, str(t))
+ elif t.sources != slist:
+ raise UserError, "Multiple ways to build the same target were specified for: %s" % str(t)
+
+ t.build_args = args
+ t.cwd = SCons.Node.FS.default_fs.getcwd()
t.builder_set(builder)
t.env_set(env)
t.add_source(slist)
target_factory = None,
source_factory = None,
scanner = None,
- emitter = None):
+ emitter = None,
+ multi = 0):
if name is None:
raise UserError, "You must specify a name for the builder."
self.name = name
self.action = SCons.Action.Action(action)
+ self.multi = multi
if callable(prefix):
self.prefix = prefix
src_suf),
self.source_factory)
- for t in tlist:
- t.build_args = args
- return tlist, slist
+ return tlist, slist
def __call__(self, env, target = None, source = None, **kw):
tlist, slist = self._create_nodes(env, kw, target, source)
if len(tlist) == 1:
- _init_nodes(self, env, tlist, slist)
+ _init_nodes(self, env, kw, tlist, slist)
tlist = tlist[0]
else:
- _init_nodes(ListBuilder(self, env, tlist), env, tlist, slist)
+ _init_nodes(ListBuilder(self, env, tlist), env, kw, tlist, slist)
return tlist
self.builder = builder
self.scanner = builder.scanner
self.env = env
- self.tlist = tlist
+ self.tlist = tlist
+ self.multi = builder.multi
+ self.name = "ListBuilder(%s)"%builder.name
def execute(self, **kw):
if hasattr(self, 'status'):
"""
return self.tlist
+ def __cmp__(self, other):
+ return cmp(self.__dict__, other.__dict__)
+
class MultiStepBuilder(BuilderBase):
"""This is a builder subclass that can build targets in
multiple steps. The src_builder parameter to the constructor
import TestCmd
import SCons.Builder
import SCons.Errors
+import SCons.Node.FS
# Initial setup of the common environment for all tests,
# a temporary working directory containing a
pass
scn = TestScanner()
builder = SCons.Builder.Builder(name = "builder", scanner=scn)
- tgt = builder(env, target='foo', source='bar')
+ tgt = builder(env, target='foo2', source='bar')
assert tgt.target_scanner == scn, tgt.target_scanner
builder1 = SCons.Builder.Builder(name = "builder1",
action='foo',
src_builder = builder1,
scanner = scn)
- tgt = builder2(env, target='baz', source='test.bar test2.foo test3.txt')
+ tgt = builder2(env, target='baz2', source='test.bar test2.foo test3.txt')
assert tgt.target_scanner == scn, tgt.target_scanner
def test_src_scanner(slf):
"""Test emitter functions."""
def emit(target, source, env, foo=0, bar=0):
if foo:
- target.append("bar")
+ target.append("bar%d"%foo)
if bar:
- source.append("foo")
+ source.append("baz")
return ( target, source )
builder = SCons.Builder.Builder(name="builder", action='foo',
emitter=emit)
- tgt = builder(env, target='foo', source='bar')
- assert str(tgt) == 'foo', str(tgt)
+ tgt = builder(env, target='foo2', source='bar')
+ assert str(tgt) == 'foo2', str(tgt)
assert str(tgt.sources[0]) == 'bar', str(tgt.sources[0])
- tgt = builder(env, target='foo', source='bar', foo=1)
+ tgt = builder(env, target='foo3', source='bar', foo=1)
assert len(tgt) == 2, len(tgt)
- assert 'foo' in map(str, tgt), map(str, tgt)
- assert 'bar' in map(str, tgt), map(str, tgt)
+ assert 'foo3' in map(str, tgt), map(str, tgt)
+ assert 'bar1' in map(str, tgt), map(str, tgt)
- tgt = builder(env, target='foo', source='bar', bar=1)
- assert str(tgt) == 'foo', str(tgt)
+ tgt = builder(env, target='foo4', source='bar', bar=1)
+ assert str(tgt) == 'foo4', str(tgt)
assert len(tgt.sources) == 2, len(tgt.sources)
- assert 'foo' in map(str, tgt.sources), map(str, tgt.sources)
+ assert 'baz' in map(str, tgt.sources), map(str, tgt.sources)
assert 'bar' in map(str, tgt.sources), map(str, tgt.sources)
env2=Environment(FOO=emit)
builder2=SCons.Builder.Builder(name="builder2", action='foo',
emitter="$FOO")
- tgt = builder2(env2, target='foo', source='bar')
- assert str(tgt) == 'foo', str(tgt)
+ tgt = builder2(env2, target='foo5', source='bar')
+ assert str(tgt) == 'foo5', str(tgt)
assert str(tgt.sources[0]) == 'bar', str(tgt.sources[0])
- tgt = builder2(env2, target='foo', source='bar', foo=1)
+ tgt = builder2(env2, target='foo6', source='bar', foo=2)
assert len(tgt) == 2, len(tgt)
- assert 'foo' in map(str, tgt), map(str, tgt)
- assert 'bar' in map(str, tgt), map(str, tgt)
+ assert 'foo6' in map(str, tgt), map(str, tgt)
+ assert 'bar2' in map(str, tgt), map(str, tgt)
- tgt = builder2(env2, target='foo', source='bar', bar=1)
- assert str(tgt) == 'foo', str(tgt)
+ tgt = builder2(env2, target='foo7', source='bar', bar=1)
+ assert str(tgt) == 'foo7', str(tgt)
assert len(tgt.sources) == 2, len(tgt.sources)
- assert 'foo' in map(str, tgt.sources), map(str, tgt.sources)
+ assert 'baz' in map(str, tgt.sources), map(str, tgt.sources)
assert 'bar' in map(str, tgt.sources), map(str, tgt.sources)
if __name__ == "__main__":
Alias = SCons.Builder.Builder(name = 'Alias',
action = alias_builder,
target_factory = SCons.Node.Alias.default_ans.Alias,
- source_factory = SCons.Node.FS.default_fs.Entry)
+ source_factory = SCons.Node.FS.default_fs.Entry,
+ multi = 1)
def get_devstudio_versions ():
"""
sys.stderr.write(line+'\n')
sys.exit(2)
+def find_deepest_user_frame(tb):
+ """
+ Find the deepest stack frame that is not part of SCons.
+ """
+
+ stack = [tb]
+ while tb.tb_next is not None:
+ tb = tb.tb_next
+ stack.append(tb)
+
+ stack.reverse()
+
+ # find the deepest traceback frame that is not part
+ # of SCons:
+ for frame in stack:
+ filename = frame.tb_frame.f_code.co_filename
+ if string.find(filename, os.sep+'SCons'+os.sep) == -1:
+ tb = frame
+ break
+
+ return tb
+
def _scons_user_error(e):
"""Handle user errors. Print out a message and a description of the
- error, along with the line number and routine where it occured.
+ error, along with the line number and routine where it occured.
+ The file and line number will be the deepest stack frame that is
+ not part of SCons itself.
"""
etype, value, tb = sys.exc_info()
- while tb.tb_next is not None:
- tb = tb.tb_next
+ tb = find_deepest_user_frame(tb)
lineno = traceback.tb_lineno(tb)
filename = tb.tb_frame.f_code.co_filename
routine = tb.tb_frame.f_code.co_name
def _scons_user_warning(e):
"""Handle user warnings. Print out a message and a description of
the warning, along with the line number and routine where it occured.
+ The file and line number will be the deepest stack frame that is
+ not part of SCons itself.
"""
etype, value, tb = sys.exc_info()
- while tb.tb_next is not None:
- tb = tb.tb_next
+ tb = find_deepest_user_frame(tb)
lineno = traceback.tb_lineno(tb)
filename = tb.tb_frame.f_code.co_filename
routine = tb.tb_frame.f_code.co_name
foo.Library(target = 'foo', source = 'foo.c')
bar.Library(target = 'bar', source = 'bar.c')
-foo.Program(target = 'f', source = 'main.c')
-bar.Program(target = 'b', source = 'main.c')
+obj = foo.Object('main', 'main.c')
+
+foo.Program(target = 'f', source = obj)
+bar.Program(target = 'b', source = obj)
""" % python)
test.write('foo.c', r"""
foo.Library(target = 'foo', source = 'foo.c')
bar.Library(target = 'bar', source = 'bar.c')
-foo.Program(target = 'f', source = 'main.c')
-bar.Program(target = 'b', source = 'main.c')
+obj = foo.Object('main', 'main.c')
+
+foo.Program(target = 'f', source = obj)
+bar.Program(target = 'b', source = obj)
""" % python)
test.write('foo.c', r"""
SConscript('sub2/SConscript', "env")
env.Alias('foo', ['f2.out', 'sub1'])
env.Alias('bar', ['sub2', 'f3.out'])
+env.Alias('blat', ['sub2', 'f3.out'])
+env.Alias('blat', ['f2.out', 'sub1'])
env.Depends('f1.out', 'bar')
""" % python)
test.up_to_date(arguments = 'f1.out')
+os.unlink(test.workpath('f2.out'))
+os.unlink(test.workpath('f3.out'))
+
+test.run(arguments = 'blat')
+
+test.fail_test(not os.path.exists(test.workpath('f2.out')))
+test.fail_test(not os.path.exists(test.workpath('f3.out')))
+
test.pass_test()
test.write('SConstruct', """
env1 = Environment(LIBS = [ 'foo1' ],
LIBPATH = [ './lib1' ])
-env1.Program(target = 'prog', source = 'prog.c')
-env1.Library(target = './lib1/foo1', source = 'f1.c')
+
+prog = env1.Object('prog', 'prog.c')
+f1 = env1.Object('f1', 'f1.c')
+
+env1.Program(target = 'prog', source = prog)
+env1.Library(target = './lib1/foo1', source = f1)
env2 = Environment(LIBS = 'foo2',
LIBPATH = '.')
-env2.Program(target = 'prog2', source = 'prog.c')
-env2.Library(target = 'foo2', source = 'f1.c')
+env2.Program(target = 'prog2', source = prog)
+env2.Library(target = 'foo2', source = f1)
""")
test.write('f1.c', r"""
test.write('SConstruct', """
env1 = Environment(LIBS = [ 'foo1' ],
LIBPATH = [ './lib1', './lib2' ])
-env1.Program(target = 'prog', source = 'prog.c')
-env1.Library(target = './lib1/foo1', source = 'f1.c')
+
+prog = env1.Object('prog', 'prog.c')
+f1 = env1.Object('f1', 'f1.c')
+
+env1.Program(target = 'prog', source = prog)
+env1.Library(target = './lib1/foo1', source = f1)
env2 = Environment(LIBS = 'foo2',
LIBPATH = '. ./lib2')
-env2.Program(target = 'prog2', source = 'prog.c')
-env2.Library(target = 'foo2', source = 'f1.c')
+env2.Program(target = 'prog2', source = prog)
+env2.Library(target = 'foo2', source = f1)
""")
test.up_to_date(arguments = '.', stderr=None)
foo.Library(target = 'foo', source = 'foo.c')
bar.Library(target = 'bar', source = 'bar.c')
-foo.Program(target = 'f', source = 'main.c')
-bar.Program(target = 'b', source = 'main.c')
+main = foo.Object('main', 'main.c')
+
+foo.Program(target = 'f', source = main)
+bar.Program(target = 'b', source = main)
""" % python)
test.write('foo.c', r"""
foo.Library(target = 'foo', source = 'foo.c')
bar.Library(target = 'bar', source = 'bar.c')
-foo.Program(target = 'f', source = 'main.c')
-bar.Program(target = 'b', source = 'main.c')
+main = foo.Object('main', 'main.c')
+
+foo.Program(target = 'f', source = main)
+bar.Program(target = 'b', source = main)
""" % python)
test.write('foo.c', r"""
import TestSCons
import string
-test = TestSCons.TestSCons(match = TestCmd.match_re)
+test = TestSCons.TestSCons(match = TestCmd.match_re_dotall)
test.write('foo.in', 'foo')
test.write('exit.in', 'exit')
stderr = """scons: \*\*\* \[exit.out\] Exception
Traceback \((most recent call|innermost) last\):
File ".+", line \d+, in .+
- .+
File ".+", line \d+, in .+
- .+
File ".+", line \d+, in .+
- .+
File ".+", line \d+, in .+
.+
.+
stdout = "other errors\n",
stderr = r"""Traceback \((most recent call|innermost) last\):
File ".+", line \d+, in .+
- .+
File ".+", line \d+, in .+
- .+
File ".+", line \d+, in .+
- .+
File "SConstruct3", line \d+, in \?
raise InternalError, 'error inside'
InternalError: error inside
import TestSCons
import TestCmd
-test = TestSCons.TestSCons(match = TestCmd.match_re)
+test = TestSCons.TestSCons(match = TestCmd.match_re_dotall)
test.write('SConstruct', """
def func(source = None, target = None, env = None):
test.run(arguments = "foo.out", stderr = """scons: \*\*\* \[foo.out\] Exception
Traceback \((most recent call|innermost) last\):
File ".+", line \d+, in .+
- .+
File ".+", line \d+, in .+
- .+
File ".+", line \d+, in .+
- .+
File "SConstruct", line 3, in func
raise "func exception"
func exception
env = Environment(LINKFLAGS = '$LINKXXX', LINKXXX = linkflags)
env.Program(target = 'foo', source = 'foo.c')
# Library(shared=1) uses $LINKFLAGS by default.
-env.Library(target = 'bar', source = 'foo.c', shared=1, no_import_lib=1)
+env.Library(target = 'bar', source = 'bar.c', shared=1, no_import_lib=1)
""" % (linkflag, linkflag))
test.write('foo.c', r"""
}
""")
+test.write('bar.c', r"""
+int
+main(int argc, char *argv[])
+{
+ argv[argc++] = "--";
+ printf("foo.c\n");
+ exit (0);
+}
+""")
+
+
test.run(arguments = '.')
test.up_to_date(arguments = '.')
--- /dev/null
+#!/usr/bin/env python
+#
+# Copyright (c) 2001, 2002 Steven Knight
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestSCons
+import os.path
+
+test = TestSCons.TestSCons()
+
+test.write('SConstruct', """
+def build(env, target, source):
+ file = open(str(target[0]), "wt")
+ for s in source:
+ file.write(open(str(s), 'rt').read())
+
+B = Builder(name='B', action=build, multi=1)
+env = Environment(BUILDERS = [B])
+env.B(target = 'foo.out', source = 'foo.in')
+env.B(target = 'foo.out', source = 'bar.in')
+""")
+
+test.write('foo.in', 'foo.in\n')
+test.write('bar.in', 'bar.in\n')
+
+test.run(arguments='foo.out')
+
+test.fail_test(not os.path.exists(test.workpath('foo.out')))
+test.fail_test(not test.read('foo.out') == 'foo.in\nbar.in\n')
+
+test.write('SConstruct', """
+def build(env, target, source):
+ file = open(str(target[0]), "wt")
+ for s in source:
+ file.write(open(str(s), 'rt').read())
+
+B = Builder(name='B', action=build, multi=0)
+env = Environment(BUILDERS = [B])
+env.B(target = 'foo.out', source = 'foo.in')
+env.B(target = 'foo.out', source = 'bar.in')
+""")
+
+test.run(arguments='foo.out',
+ status=2,
+ stderr="""
+SCons error: Multiple ways to build the same target were specified for: foo.out
+File "SConstruct", line 10, in ?
+""")
+
+test.write('SConstruct', """
+def build(env, target, source):
+ file = open(str(target[0]), "wt")
+ for s in source:
+ file.write(open(str(s), 'rt').read())
+
+B = Builder(name='B', action=build, multi=1)
+env = Environment(BUILDERS = [B])
+env.B(target = 'foo.out', source = 'foo.in', foo=1)
+env.B(target = 'foo.out', source = 'bar.in', foo=2)
+""")
+
+test.run(arguments='foo.out',
+ status=2,
+ stderr="""
+SCons error: Two different sets of build arguments were specified for the same target: foo.out
+File "SConstruct", line 10, in ?
+""")
+
+test.write('SConstruct', """
+def build(env, target, source):
+ file = open(str(target[0]), "wt")
+ for s in source:
+ file.write(open(str(s), 'rt').read())
+
+B = Builder(name='B', action=build, multi=1)
+env = Environment(BUILDERS = [B])
+env2 = env.Copy(CCFLAGS='foo')
+env.B(target = 'foo.out', source = 'foo.in')
+env2.B(target = 'foo.out', source = 'bar.in')
+""")
+
+test.run(arguments='foo.out',
+ status=2,
+ stderr="""
+SCons error: Two different environments were specified for the same target: foo.out
+File "SConstruct", line 11, in ?
+""")
+
+test.write('SConstruct', """
+def build(env, target, source):
+ file = open(str(target[0]), "wt")
+ for s in source:
+ file.write(open(str(s), 'rt').read())
+
+B = Builder(name='B', action=build, multi=0)
+env = Environment(BUILDERS = [B])
+env.B(target = 'foo.out', source = 'foo.in')
+env.B(target = 'foo.out', source = 'foo.in')
+""")
+
+test.run(arguments='foo.out')
+test.fail_test(not test.read('foo.out') == 'foo.in\n')
+
+test.write('SConstruct', """
+def build(env, target, source):
+ file = open(str(target[0]), "wt")
+ for s in source:
+ file.write(open(str(s), 'rt').read())
+
+B = Builder(name='B', action=build, multi=1)
+C = Builder(name='C', action=build, multi=1)
+env = Environment(BUILDERS = [B,C])
+env.B(target = 'foo.out', source = 'foo.in')
+env.C(target = 'foo.out', source = 'bar.in')
+""")
+
+test.run(arguments='foo.out',
+ status=2,
+ stderr="""
+SCons error: Two different builders (B and C) were specified for the same target: foo.out
+File "SConstruct", line 11, in ?
+""")
+
+test.write('SConstruct', """
+def build(env, target, source):
+ for t in target:
+ file = open(str(t), "wt")
+ for s in source:
+ file.write(open(str(s), 'rt').read())
+
+B = Builder(name='B', action=build, multi=1)
+env = Environment(BUILDERS = [B])
+env.B(target = ['foo.out', 'bar.out'], source = 'foo.in')
+env.B(target = ['foo.out', 'bar.out'], source = 'bar.in')
+""")
+
+test.run(arguments='bar.out')
+test.fail_test(not os.path.exists(test.workpath('bar.out')))
+test.fail_test(not test.read('bar.out') == 'foo.in\nbar.in\n')
+test.fail_test(not os.path.exists(test.workpath('foo.out')))
+test.fail_test(not test.read('foo.out') == 'foo.in\nbar.in\n')
+
+test.write('SConstruct', """
+def build(env, target, source):
+ for t in target:
+ file = open(str(target[0]), "wt")
+ for s in source:
+ file.write(open(str(s), 'rt').read())
+
+B = Builder(name='B', action=build, multi=1)
+env = Environment(BUILDERS = [B])
+env.B(target = ['foo.out', 'bar.out'], source = 'foo.in')
+env.B(target = ['bar.out', 'foo.out'], source = 'bar.in')
+""")
+
+# This is intentional. The order of the targets matter to the
+# builder because the build command can contain things like ${TARGET[0]}:
+test.run(arguments='foo.out',
+ status=2,
+ stderr="""
+SCons error: Two different target sets have a target in common: bar.out
+File "SConstruct", line 11, in ?
+""")
+
+# XXX It would be nice if the following two tests could be made to
+# work by executing the action once for each unique set of
+# targets. This would make it simple to deal with PDB files on Windows like so:
+#
+# env.Object(['foo.obj', 'vc60.pdb'], 'foo.c')
+# env.Object(['bar.obj', 'vc60.pdb'], 'bar.c')
+
+test.write('SConstruct', """
+def build(env, target, source):
+ for t in target:
+ file = open(str(target[0]), "wt")
+ for s in source:
+ file.write(open(str(s), 'rt').read())
+
+B = Builder(name='B', action=build, multi=1)
+env = Environment(BUILDERS = [B])
+env.B(target = ['foo.out', 'bar.out'], source = 'foo.in')
+env.B(target = ['bar.out', 'blat.out'], source = 'bar.in')
+""")
+
+test.run(arguments='foo.out',
+ status=2,
+ stderr="""
+SCons error: Two different target sets have a target in common: bar.out
+File "SConstruct", line 11, in ?
+""")
+
+test.write('SConstruct', """
+def build(env, target, source):
+ for t in target:
+ file = open(str(target[0]), "wt")
+ for s in source:
+ file.write(open(str(s), 'rt').read())
+
+B = Builder(name='B', action=build, multi=1)
+env = Environment(BUILDERS = [B])
+env.B(target = ['foo.out', 'bar.out'], source = 'foo.in')
+env.B(target = 'foo.out', source = 'bar.in')
+""")
+
+test.run(arguments='foo.out',
+ status=2,
+ stderr="""
+SCons error: Two different builders (ListBuilder(B) and B) were specified for the same target: foo.out
+File "SConstruct", line 11, in ?
+""")
+
+
+
+
+test.pass_test()
test.write('SConstruct', """
import SCons.Defaults
-B = Builder(name='B', action='%s build.py $TARGET $SOURCES')
+B = Builder(name='B', action='%s build.py $TARGET $SOURCES', multi=1)
env = Environment(BUILDERS = [B, SCons.Defaults.Alias])
Default(env.B(target = 'sub1/foo.out', source = 'sub1/foo.in'))
Export('env')