diff options
Diffstat (limited to 'src/engine/SCons/Environment.py')
-rw-r--r-- | src/engine/SCons/Environment.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index e5eb40c..94cdf74 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -327,7 +327,7 @@ class SubstitutionEnvironment: def items(self): return self._dict.items() - def arg2nodes(self, args, node_factory=_null, lookup_list=_null): + def arg2nodes(self, args, node_factory=_null, lookup_list=_null, **kw): if node_factory is _null: node_factory = self.fs.File if lookup_list is _null: @@ -351,7 +351,9 @@ class SubstitutionEnvironment: break if not n is None: if SCons.Util.is_String(n): - n = self.subst(n, raw=1) + # n = self.subst(n, raw=1, **kw) + kw['raw'] = 1 + n = apply(self.subst, (n,), kw) if node_factory: n = node_factory(n) if SCons.Util.is_List(n): @@ -359,7 +361,9 @@ class SubstitutionEnvironment: else: nodes.append(n) elif node_factory: - v = node_factory(self.subst(v, raw=1)) + # v = node_factory(self.subst(v, raw=1, **kw)) + kw['raw'] = 1 + v = node_factory(apply(self.subst, (v,), kw)) if SCons.Util.is_List(v): nodes.extend(v) else: @@ -473,6 +477,14 @@ class SubstitutionEnvironment: raise OSError("'%s' exited %d" % (command, status)) return out + def AddMethod(self, function, name=None): + """ + Adds the specified function as a method of this construction + environment with the specified name. If the name is omitted, + the default name is the name of the function itself. + """ + SCons.Util.AddMethod(self, function, name) + def Override(self, overrides): """ Produce a modified environment whose variables are overriden by @@ -1453,7 +1465,7 @@ class Base(SubstitutionEnvironment): def AlwaysBuild(self, *targets): tlist = [] for t in targets: - tlist.extend(self.arg2nodes(t, self.fs.File)) + tlist.extend(self.arg2nodes(t, self.fs.Entry)) for t in tlist: t.set_always_build() return tlist |