Fix Value node expansion in command-line strings. (Kevin Quick)
[scons.git] / src / engine / SCons / Util.py
index ec809b9ffb0944c343230d6e38cc84934d6f2262..896abaf26176275b916cd3010624ca0af1d3ab93 100644 (file)
@@ -493,7 +493,15 @@ def subst_dict(target, source):
         dict['TARGET'] = Target_or_Source(tnl)
 
     if source:
-        snl = NLWrapper(source, lambda x: x.rfile().get_subst_proxy())
+        def get_src_subst_proxy(node):
+            try:
+                rfile = node.rfile
+            except AttributeError:
+                pass
+            else:
+                node = rfile()
+            return node.get_subst_proxy()
+        snl = NLWrapper(source, get_src_subst_proxy)
         dict['SOURCES'] = Targets_or_Sources(snl)
         dict['SOURCE'] = Target_or_Source(snl)