summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-04-14 13:43:32 (GMT)
committerSteven Knight <knight@baldmt.com>2004-04-14 13:43:32 (GMT)
commite1989d22646b003f44677f43f9e2ddbbafd0ba62 (patch)
tree59ae71809d6fa17570cbb9c56cfec9034e93e4aa /src
parent73f9a42aaa603934e51ffb10bc256e9a3c17cd9b (diff)
downloadSCons-e1989d22646b003f44677f43f9e2ddbbafd0ba62.zip
SCons-e1989d22646b003f44677f43f9e2ddbbafd0ba62.tar.gz
SCons-e1989d22646b003f44677f43f9e2ddbbafd0ba62.tar.bz2
Filter null values from the _concat() list. (Chad Austin)
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt3
-rw-r--r--src/engine/SCons/Defaults.py23
2 files changed, 15 insertions, 11 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index bf2c760..b5ed500 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -22,6 +22,9 @@ RELEASE 0.96 - XXX
- 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
diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py
index 94ab8d5..89ac0d3 100644
--- a/src/engine/SCons/Defaults.py
+++ b/src/engine/SCons/Defaults.py
@@ -173,20 +173,21 @@ def _concat(prefix, list, suffix, env, f=lambda x: x):
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