diff options
Diffstat (limited to 'src/engine/SCons/Action.py')
-rw-r--r-- | src/engine/SCons/Action.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index 503dc9f..dd7009c 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -100,12 +100,12 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import dis import os import os.path -import re import string import sys from SCons.Debug import logInstanceCreation import SCons.Errors +import SCons.Executor import SCons.Util class _Null: @@ -403,7 +403,8 @@ class CommandAction(_ActionAction): def strfunction(self, target, source, env): if not self.cmdstr is None: - c = env.subst(self.cmdstr, SCons.Subst.SUBST_RAW, target, source) + from SCons.Subst import SUBST_RAW + c = env.subst(self.cmdstr, SUBST_RAW, target, source) if c: return c cmd_list, ignore, silent = self.process(target, source, env) @@ -421,7 +422,10 @@ class CommandAction(_ActionAction): externally. """ from SCons.Subst import escape_list - from SCons.Util import is_String, is_List, flatten + import SCons.Util + flatten = SCons.Util.flatten + is_String = SCons.Util.is_String + is_List = SCons.Util.is_List try: shell = env['SHELL'] @@ -432,6 +436,9 @@ class CommandAction(_ActionAction): spawn = env['SPAWN'] except KeyError: raise SCons.Errors.UserError('Missing SPAWN construction variable.') + else: + if is_String(spawn): + spawn = env.subst(spawn, raw=1, conv=lambda x: x) escape = env.get('ESCAPE', lambda x: x) @@ -618,7 +625,8 @@ class FunctionAction(_ActionAction): if self.cmdstr is None: return None if not self.cmdstr is _null: - c = env.subst(self.cmdstr, SCons.Subst.SUBST_RAW, target, source) + from SCons.Subst import SUBST_RAW + c = env.subst(self.cmdstr, SUBST_RAW, target, source) if c: return c def array(a): |