diff options
author | Steven Knight <knight@baldmt.com> | 2002-03-08 18:22:23 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-03-08 18:22:23 (GMT) |
commit | 952df96acecd62355d351976be1384f4e7d4bc17 (patch) | |
tree | 51d74795fee1d0bc29c896eba7a6213360c93586 /src/engine/SCons/Util.py | |
parent | bd1384bd791e94dd5191f50d92850e857a987d08 (diff) | |
download | SCons-952df96acecd62355d351976be1384f4e7d4bc17.zip SCons-952df96acecd62355d351976be1384f4e7d4bc17.tar.gz SCons-952df96acecd62355d351976be1384f4e7d4bc17.tar.bz2 |
Fix an exception caused by a null-string CPPPATH.
Diffstat (limited to 'src/engine/SCons/Util.py')
-rw-r--r-- | src/engine/SCons/Util.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py index 038468f..2202abd 100644 --- a/src/engine/SCons/Util.py +++ b/src/engine/SCons/Util.py @@ -306,7 +306,12 @@ class VarInterpolator: 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]) @@ -345,16 +350,18 @@ class DirVarInterp(VarInterpolator): 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): |