summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/sconsexamples.py6
-rw-r--r--bin/sconsoutput.py5
-rw-r--r--test/Install/INSTALLSTR.py2
-rw-r--r--test/ToolSurrogate.py6
4 files changed, 15 insertions, 4 deletions
diff --git a/bin/sconsexamples.py b/bin/sconsexamples.py
index 5fbdc41..ac8dce3 100644
--- a/bin/sconsexamples.py
+++ b/bin/sconsexamples.py
@@ -156,6 +156,7 @@ Prompt = {
# command output.
Stdin = """\
+import string
import SCons.Defaults
platform = '%s'
@@ -176,7 +177,10 @@ class Curry:
return apply(self.fun, self.pending + args, kw)
def Str(target, source, env, cmd=""):
- return env.subst(cmd, target=target, source=source)
+ result = []
+ for cmd in env.subst_list(cmd, target=target, source=source):
+ result.append(string.join(map(str, cmd)))
+ return string.join(result, '\\n')
class ToolSurrogate:
def __init__(self, tool, variable, func):
diff --git a/bin/sconsoutput.py b/bin/sconsoutput.py
index 536bcea..ecc816c 100644
--- a/bin/sconsoutput.py
+++ b/bin/sconsoutput.py
@@ -238,7 +238,10 @@ class Curry:
return apply(self.fun, self.pending + args, kw)
def Str(target, source, env, cmd=""):
- return env.subst(cmd, target=target, source=source)
+ result = []
+ for cmd in env.subst_list(cmd, target=target, source=source):
+ result.append(string.join(map(str, cmd)))
+ return string.join(result, '\\n')
class ToolSurrogate:
def __init__(self, tool, variable, func, varlist):
diff --git a/test/Install/INSTALLSTR.py b/test/Install/INSTALLSTR.py
index d809b2c..0b51558 100644
--- a/test/Install/INSTALLSTR.py
+++ b/test/Install/INSTALLSTR.py
@@ -37,7 +37,7 @@ test = TestSCons.TestSCons()
test.subdir('install')
test.write('SConstruct', """\
-env = Environment(INSTALLSTR = 'INSTALL $SOURCE => $TARGET!\\n')
+env = Environment(INSTALLSTR = 'INSTALL $SOURCE => $TARGET!')
env.Install('install', 'file')
""")
diff --git a/test/ToolSurrogate.py b/test/ToolSurrogate.py
index 5db156e..dd5ea06 100644
--- a/test/ToolSurrogate.py
+++ b/test/ToolSurrogate.py
@@ -34,6 +34,7 @@ import TestSCons
test = TestSCons.TestSCons()
test.write('SConstruct', """\
+import string
class Curry:
def __init__(self, fun, *args, **kwargs):
self.fun = fun
@@ -50,7 +51,10 @@ class Curry:
return apply(self.fun, self.pending + args, kw)
def Str(target, source, env, cmd=""):
- return env.subst(cmd, target=target, source=source)
+ result = []
+ for cmd in env.subst_list(cmd, target=target, source=source):
+ result.append(string.join(map(str, cmd)))
+ return string.join(result, '\\n')
class ToolSurrogate:
def __init__(self, tool, variable, func):