diff --git a/Tools/freeze/checkextensions.py b/Tools/freeze/checkextensions.py index 4ed2a7c33c6..8d597bfae96 100644 --- a/Tools/freeze/checkextensions.py +++ b/Tools/freeze/checkextensions.py @@ -47,9 +47,10 @@ def select(e, mods, vars, mod, skipofiles): for w in string.split(w): if skipofiles and w[-2:] == '.o': continue - if w[0] != '-' and w[-2:] in ('.o', '.a'): + # Assume $var expands to absolute pathname + if w[0] not in ('-', '$') and w[-2:] in ('.o', '.a'): w = os.path.join(e, w) - if w[:2] in ('-L', '-R'): + if w[:2] in ('-L', '-R') and w[2:3] != '$': w = w[:2] + os.path.join(e, w[2:]) files.append(w) return files