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/engine | |
| 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/engine')
| -rw-r--r-- | src/engine/SCons/Defaults.py | 7 |
1 files changed, 6 insertions, 1 deletions
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: |
