file basename. This supports version numbers as part of shared
library names, for example.
+ - Avoid problems when there are null entries (None or '') in tool
+ lists or CPPPATH.
+
From Simon Perkins:
- Fix a bug introduced in building shared libraries under MinGW.
pathlist = string.split(pathlist, os.pathsep)
if not SCons.Util.is_List(pathlist):
pathlist = [pathlist]
- for path in pathlist:
+ for path in filter(None, pathlist):
if isinstance(path, SCons.Node.Node):
ret.append(path)
else:
list = map(str, fs.Rsearchall(['d3', work_d4]))
assert list == ['d3', str(work_d4)], list
+ list = fs.Rsearchall('')
+ assert list == [], list
+
+ list = fs.Rsearchall([None])
+ assert list == [], list
+
+ list = fs.Rsearchall([''])
+ assert list == [], list
+
fs.BuildDir('build', '.')
f = fs.File(test.workpath("work", "i_do_not_exist"))
test.up_to_date(arguments = args)
-# Check that a null-string CPPPATH doesn't blow up.
+# Check that neither a null-string CPPPATH nor a
+# a CPPPATH containing null values blows up.
test.write('SConstruct', """
env = Environment(CPPPATH = '')
-env.Library('foo', source = 'empty.c')
+env.Library('one', source = 'empty1.c')
+env = Environment(CPPPATH = [None])
+env.Library('two', source = 'empty2.c')
+env = Environment(CPPPATH = [''])
+env.Library('three', source = 'empty3.c')
""")
-test.write('empty.c', """
-""")
+test.write('empty1.c', "\n")
+test.write('empty2.c', "\n")
+test.write('empty3.c', "\n")
test.run(arguments = '.',
stderr=TestSCons.noisy_ar,