- Use the POSIX-standard lex -t flag, not the GNU-specific -o flag.
(Bug reported by Russell Christensen.)
+ - Fixed an exception when CPPPATH or LIBPATH is a null string.
+ (Bug reported by Richard Kiss.)
+
RELEASE 0.05 - Thu, 21 Feb 2002 16:50:03 -0600
if not dict.has_key(self.src):
dict[self.dest] = ''
return
- src = self.prepareSrc(dict)
+
+ src = filter(lambda x: not x is None, self.prepareSrc(dict))
+
+ if not src:
+ dict[self.dest] = ''
+ return
try:
prefix = str(dict[self.prefix])
self.fs = None
self.Dir = None
self.dictInstCache = {}
-
+
def prepareSrc(self, dict):
src = VarInterpolator.prepareSrc(self, dict)
-
- def prepare(x, self=self):
- if not isinstance(x, SCons.Node.Node):
- return self.fs.Dir(str(x), directory=self.dir)
- else:
- return x
-
+
+ def prepare(x, self=self):
+ if isinstance(x, SCons.Node.Node):
+ return x
+ elif str(x):
+ return self.fs.Dir(str(x), directory=self.dir)
+ else:
+ return None
+
return map(prepare, src)
def instance(self, dir, fs):
assert dict['_INCFLAGS'][7] == '$)', \
dict['_INCFLAGS'][7]
+ dict = {'CPPPATH' : '',
+ 'LIBPATH' : '' }
+ autogenerate(dict, dir = SCons.Node.FS.default_fs.Dir('/yy'))
+ assert len(dict['_INCFLAGS']) == 0, dict['_INCFLAGS']
+ assert len(dict['_LIBDIRFLAGS']) == 0, dict['_LIBDIRFLAGS']
+
def test_render_tree(self):
class Node:
def __init__(self, name, children=[]):
test.up_to_date(arguments = args)
+# Check that a null-string CPPPATH doesn't blow up.
+test.write('SConstruct', """
+env = Environment(CPPPATH = '')
+env.Library('foo', source = '')
+""")
+
+test.run(arguments = '.')
+
test.pass_test()
test.up_to_date(arguments = '.', stderr = None)
+# Check that a null-string LIBPATH doesn't blow up.
+test.write('SConstruct', """
+env = Environment(LIBPATH = '')
+env.Library('foo', source = '')
+""")
+
+test.run(arguments = '.')
+
test.pass_test()