return Action(x)
self.list = map(list_of_actions, list)
+ def genstring(self, target, source, env):
+ return string.join(map(lambda a, t=target, s=source, e=env:
+ a.genstring(t, s, e),
+ self.list),
+ '\n')
+
def __str__(self):
return string.join(map(str, self.list), '\n')
"""
def f(target,source,env):
pass
- def g(target,source,env):
- pass
+ def g(target,source,env,for_signature):
+ return 'generated %s %s' % (target[0], source[0])
+ g = SCons.Action.CommandGenerator(g)
a = SCons.Action.ListAction([f, g, "XXX", f])
- s = a.genstring([], [], Environment())
- assert s == "f(target, source, env)\ng(target, source, env)\nXXX\nf(target, source, env)", s
+ s = a.genstring(['foo.x'], ['bar.y'], Environment())
+ assert s == "f(target, source, env)\ngenerated foo.x bar.y\nXXX\nf(target, source, env)", s
def test_execute(self):
"""Test executing a list of subsidiary Actions