summaryrefslogtreecommitdiffstats
path: root/test/Dir.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-10-20 23:59:50 (GMT)
committerSteven Knight <knight@baldmt.com>2004-10-20 23:59:50 (GMT)
commitdf03c65239ee829c8e1a9a932721d75a5a785416 (patch)
tree831d26e0cdc9a858e043836ee1b1aaefafe5a9ca /test/Dir.py
parent40385b812685e9043d67eca88c3f215aabe655a4 (diff)
downloadSCons-df03c65239ee829c8e1a9a932721d75a5a785416.zip
SCons-df03c65239ee829c8e1a9a932721d75a5a785416.tar.gz
SCons-df03c65239ee829c8e1a9a932721d75a5a785416.tar.bz2
Allow explicit target_factory=Dir with Builders that make a directory to override the default, implicit make-a-directory Builder..
Diffstat (limited to 'test/Dir.py')
-rw-r--r--test/Dir.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Dir.py b/test/Dir.py
index 5c4eaa3..d7ec9ae 100644
--- a/test/Dir.py
+++ b/test/Dir.py
@@ -55,4 +55,20 @@ bbb_bbb
scons: `.' is up to date.
"""))
+
+
+test.write('SConstruct', """\
+import os
+def my_mkdir(target=None, source=None, env=None):
+ os.mkdir(str(target[0]))
+
+MDBuilder = Builder(action=my_mkdir, target_factory=Dir)
+env = Environment()
+env.Append(BUILDERS = {'MD':MDBuilder})
+env.MD(target='sub1', source=['SConstruct'])
+env.MD(target='sub2', source=['SConstruct'], OVERRIDE='foo')
+""")
+
+test.run()
+
test.pass_test()