diff options
| author | Steven Knight <knight@baldmt.com> | 2003-11-25 12:32:29 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2003-11-25 12:32:29 (GMT) |
| commit | 04e36a29829d2fde6fe82af08bd1b5259ed7a7b9 (patch) | |
| tree | b1423cd6efc18970da4db42fa9bce6ba382b4664 /src | |
| parent | 402a730430c98f08a29a09a9a9b569bed36e0a4c (diff) | |
| download | SCons-04e36a29829d2fde6fe82af08bd1b5259ed7a7b9.zip SCons-04e36a29829d2fde6fe82af08bd1b5259ed7a7b9.tar.gz SCons-04e36a29829d2fde6fe82af08bd1b5259ed7a7b9.tar.bz2 | |
Restore the ability for _stripixes() to call a custom _concat() function in the construction environment.
Diffstat (limited to 'src')
| -rw-r--r-- | src/CHANGES.txt | 5 | ||||
| -rw-r--r-- | src/engine/SCons/Defaults.py | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 0d6b43d..6c36cd4 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -34,6 +34,11 @@ RELEASE 0.95 - XXX values. Previously, SCons would only use the values if all three were set in the registry. + From Scott Lystig Fritchie: + + - Fix the ability to use a custom _concat() function in the + construction environment when calling _stripixes(). + From Steven Knight: - Fix EnsureSConsVersion() so it checks against the SCons version, diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py index c75c7c7..569269e 100644 --- a/src/engine/SCons/Defaults.py +++ b/src/engine/SCons/Defaults.py @@ -186,12 +186,17 @@ def _concat(prefix, list, suffix, env, f=lambda x: x): return ret -def _stripixes(prefix, list, suffix, stripprefix, stripsuffix, env, c=_concat): +def _stripixes(prefix, list, suffix, stripprefix, stripsuffix, env, c=None): """This is a wrapper around _concat() that checks for the existence of prefixes or suffixes on list elements and strips them where it finds them. This is used by tools (like the GNU linker) that need to turn something like 'libfoo.a' into '-lfoo'.""" + if not callable(c): + if callable(env["_concat"]): + c = env["_concat"] + else: + c = _concat def f(list, sp=stripprefix, ss=stripsuffix): ret = [] for l in list: |
