summaryrefslogtreecommitdiffstats
path: root/test
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)
commit3e52ca38ff11bf7515dbeb05af362f370479bfb4 (patch)
tree831d26e0cdc9a858e043836ee1b1aaefafe5a9ca /test
parent8bafc9f80b4f1d46a32cc2eb7d5200979f465c6c (diff)
downloadSCons-3e52ca38ff11bf7515dbeb05af362f370479bfb4.zip
SCons-3e52ca38ff11bf7515dbeb05af362f370479bfb4.tar.gz
SCons-3e52ca38ff11bf7515dbeb05af362f370479bfb4.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')
-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()