summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/engine/SCons/Environment.py1
-rw-r--r--test/WhereIs.py8
2 files changed, 8 insertions, 1 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index 82744e0..f972550 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -1599,6 +1599,7 @@ class Base(SubstitutionEnvironment):
pass
elif SCons.Util.is_String(pathext):
pathext = self.subst(pathext)
+ prog = self.subst(prog)
path = SCons.Util.WhereIs(prog, path, pathext, reject)
if path: return path
return None
diff --git a/test/WhereIs.py b/test/WhereIs.py
index dccfefb..a2c5b01 100644
--- a/test/WhereIs.py
+++ b/test/WhereIs.py
@@ -74,13 +74,16 @@ print env.WhereIs('xxx.exe', %s)
print WhereIs('xxx.exe', %s)
print WhereIs('xxx.exe', %s)
print WhereIs('xxx.exe', %s, reject=%s)
+env.Replace( XXXNAME='xxx.exe' )
+print env.WhereIs( '$XXXNAME', %s )
""" % (subdir_SConscript,
repr(string.join(pathdirs_1234, os.pathsep)),
repr(string.join(pathdirs_1243, os.pathsep)),
repr(pathdirs_1234),
repr(pathdirs_1243),
repr(pathdirs_1243),
- repr(sub4_xxx_exe)
+ repr(sub4_xxx_exe),
+ repr(string.join(pathdirs_1243, os.pathsep)),
))
test.write(subdir_SConscript, """
@@ -109,6 +112,7 @@ expect = [ test.workpath(sub3_xxx_exe),
test.workpath(sub3_xxx_exe),
test.workpath(sub4_xxx_exe),
test.workpath(sub3_xxx_exe),
+ test.workpath(sub4_xxx_exe)
]
test.run(arguments = ".",
@@ -128,10 +132,12 @@ expect = [ test.workpath(sub4_xxx_exe),
test.workpath(sub3_xxx_exe),
test.workpath(sub4_xxx_exe),
test.workpath(sub3_xxx_exe),
+ test.workpath(sub4_xxx_exe)
]
test.run(arguments = ".",
stdout = test.wrap_stdout(read_str = string.join(expect, "\n") + "\n",
build_str = "scons: `.' is up to date.\n"))
+
test.pass_test()