summaryrefslogtreecommitdiffstats
path: root/test/Actions/pre-post-fixture/work2/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'test/Actions/pre-post-fixture/work2/SConstruct')
-rw-r--r--test/Actions/pre-post-fixture/work2/SConstruct26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/Actions/pre-post-fixture/work2/SConstruct b/test/Actions/pre-post-fixture/work2/SConstruct
new file mode 100644
index 0000000..61f739f
--- /dev/null
+++ b/test/Actions/pre-post-fixture/work2/SConstruct
@@ -0,0 +1,26 @@
+def b(target, source, env):
+ open(str(target[0]), 'wb').write((env['X'] + '\n').encode())
+env1 = Environment(X='111')
+env2 = Environment(X='222')
+B = Builder(action = b, env = env1, multi=1)
+print("B =", B)
+print("B.env =", B.env)
+env1.Append(BUILDERS = {'B' : B})
+env2.Append(BUILDERS = {'B' : B})
+env3 = env1.Clone(X='333')
+print("env1 =", env1)
+print("env2 =", env2)
+print("env3 =", env3)
+f1 = env1.B(File('file1.out'), [])
+f2 = env2.B('file2.out', [])
+f3 = env3.B('file3.out', [])
+def do_nothing(env, target, source):
+ pass
+AddPreAction(f2[0], do_nothing)
+AddPostAction(f3[0], do_nothing)
+print("f1[0].builder =", f1[0].builder)
+print("f2[0].builder =", f2[0].builder)
+print("f3[0].builder =", f3[0].builder)
+print("f1[0].env =", f1[0].env)
+print("f2[0].env =", f2[0].env)
+print("f3[0].env =", f3[0].env)