diff options
author | Steven Knight <knight@baldmt.com> | 2002-04-15 18:43:38 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-04-15 18:43:38 (GMT) |
commit | a8176f609ff3ecc090f51830408d3b4dc6338d7e (patch) | |
tree | bab059042f2f8cbc85dcf7a619dbebbbe23dc4fb /src/engine/SCons/Scanner | |
parent | 05029e336146444501a66b53e4699c09d6e08977 (diff) | |
download | SCons-a8176f609ff3ecc090f51830408d3b4dc6338d7e.zip SCons-a8176f609ff3ecc090f51830408d3b4dc6338d7e.tar.gz SCons-a8176f609ff3ecc090f51830408d3b4dc6338d7e.tar.bz2 |
Big change for shared libraries and a bunch of other flexibility. (Charles Crain)
Diffstat (limited to 'src/engine/SCons/Scanner')
-rw-r--r-- | src/engine/SCons/Scanner/Prog.py | 19 | ||||
-rw-r--r-- | src/engine/SCons/Scanner/ProgTests.py | 5 |
2 files changed, 17 insertions, 7 deletions
diff --git a/src/engine/SCons/Scanner/Prog.py b/src/engine/SCons/Scanner/Prog.py index 76567ab..818aa86 100644 --- a/src/engine/SCons/Scanner/Prog.py +++ b/src/engine/SCons/Scanner/Prog.py @@ -66,14 +66,21 @@ def scan(node, env, target, fs): libs = string.split(libs) try: - prefix = env.Dictionary('LIBPREFIX') + prefix = env.Dictionary('LIBPREFIXES') + if not SCons.Util.is_List(prefix): + prefix = [ prefix ] except KeyError: - prefix = '' + prefix = [ '' ] try: - suffix = env.Dictionary('LIBSUFFIX') + suffix = env.Dictionary('LIBSUFFIXES') + if not SCons.Util.is_List(suffix): + suffix = [ suffix ] except KeyError: - suffix = '' + suffix = [ '' ] - libs = map(lambda x, s=suffix, p=prefix: p + x + s, libs) - return SCons.Node.FS.find_files(libs, libpath, fs.File) + ret = [] + for suf in map(env.subst, suffix): + for pref in map(env.subst, prefix): + ret.extend(map(lambda x, s=suf, p=pref: p + x + s, libs)) + return SCons.Node.FS.find_files(ret, libpath, fs.File) diff --git a/src/engine/SCons/Scanner/ProgTests.py b/src/engine/SCons/Scanner/ProgTests.py index ea3d00d..75ce697 100644 --- a/src/engine/SCons/Scanner/ProgTests.py +++ b/src/engine/SCons/Scanner/ProgTests.py @@ -49,7 +49,7 @@ class DummyTarget: class DummyEnvironment: def __init__(self, **kw): self._dict = kw - self._dict['LIBSUFFIX'] = '.lib' + self._dict['LIBSUFFIXES'] = '.lib' def Dictionary(self, *args): if not args: @@ -67,6 +67,9 @@ class DummyEnvironment: def __delitem__(self,key): del self.Dictionary()[key] + def subst(self, s): + return s + def deps_match(deps, libs): deps=map(str, deps) deps.sort() |