- Allow the emitter argument to a Builder() to be or expand to a list
of emitter functions, which will be called in sequence.
+ - Suppress null values in construction variables like $LIBS that use
+ the internal _concat() function.
+
From Chad Austin and Christoph Wiedemann:
- Add support for a $RPATH variable to supply a list of directories
for x in list:
x = str(x)
+ if x:
- if prefix:
- if prefix[-1] == ' ':
- ret.append(prefix[:-1])
- elif x[:len(prefix)] != prefix:
- x = prefix + x
+ if prefix:
+ if prefix[-1] == ' ':
+ ret.append(prefix[:-1])
+ elif x[:len(prefix)] != prefix:
+ x = prefix + x
- ret.append(x)
+ ret.append(x)
- if suffix:
- if suffix[0] == ' ':
- ret.append(suffix[1:])
- elif x[-len(suffix):] != suffix:
- ret[-1] = ret[-1]+suffix
+ if suffix:
+ if suffix[0] == ' ':
+ ret.append(suffix[1:])
+ elif x[-len(suffix):] != suffix:
+ ret[-1] = ret[-1]+suffix
return ret
foo2_exe = test.workpath('foo2' + _exe)
foo3_exe = test.workpath('foo3' + _exe)
foo4_exe = test.workpath('foo4' + _exe)
+foo5_exe = test.workpath('foo5' + _exe)
test.write('SConstruct', """
env = Environment(LIBS=['bar'], LIBPATH = '.')
env3.Program(target='foo3', source='foo3.c')
env4 = Environment(LIBS=File(r'%s'), LIBPATH = '.')
env4.Program(target='foo4', source='foo4.c')
+env5 = Environment(LIBS=['bar', '$UNSPECIFIED'], LIBPATH = '.')
+env5.Program(target='foo5', source='foo5.c')
SConscript('sub1/SConscript', 'env')
SConscript('sub2/SConscript', 'env')
""" % (bar_lib, bar_lib))
test.write('foo2.c', foo_contents)
test.write('foo3.c', foo_contents)
test.write('foo4.c', foo_contents)
+test.write('foo5.c', foo_contents)
test.write(['sub1', 'bar.c'], r"""
#include <stdio.h>
}
""")
-test.run(arguments = '.')
+# ar sometimes produces a "warning" on stderr -- ar: creating sub1/libbar.a
+test.run(arguments = '.', stderr=None)
test.run(program=foo1_exe, stdout='sub1/bar.c\nsub1/baz.c\n')
test.run(program=foo2_exe, stdout='sub1/bar.c\nsub1/baz.c\n')
test.run(program=foo3_exe, stdout='sub1/bar.c\nsub1/baz.c\n')
test.run(program=foo4_exe, stdout='sub1/bar.c\nsub1/baz.c\n')
+test.run(program=foo5_exe, stdout='sub1/bar.c\nsub1/baz.c\n')
#
test.write('SConstruct', """