summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CHANGES.txt8
-rw-r--r--src/engine/SCons/Script/SConscript.py2
-rw-r--r--test/Default.py37
3 files changed, 41 insertions, 6 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index fc78e1d..e36ceb6 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -8,6 +8,14 @@
+RELEASE 0.04 -
+
+ From Steven Knight:
+
+ - Fix using a directory as a Default().
+
+
+
RELEASE 0.03 - Fri, 11 Jan 2002 01:09:30 -0600
From Charles Crain:
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py
index cb93d64..43868b5 100644
--- a/src/engine/SCons/Script/SConscript.py
+++ b/src/engine/SCons/Script/SConscript.py
@@ -116,7 +116,7 @@ def Default(*targets):
default_targets.append(t)
else:
for s in string.split(t):
- default_targets.append(SCons.Node.FS.default_fs.File(s))
+ default_targets.append(SCons.Node.FS.default_fs.Entry(s))
def Help(text):
if print_help:
diff --git a/test/Default.py b/test/Default.py
index 5685c3d..1d86829 100644
--- a/test/Default.py
+++ b/test/Default.py
@@ -99,30 +99,57 @@ test.fail_test(test.read(test.workpath('four', 'bar.out')) != "four/bar.in\n")
-test.subdir('subdir')
+test.subdir('sub1')
test.write('SConstruct', """
B = Builder(name = 'B', action = r'%s build.py $TARGET $SOURCES')
env = Environment(BUILDERS = [B])
env.B(target = 'xxx.out', source = 'xxx.in')
-SConscript('subdir/SConscript')
+SConscript('sub1/SConscript')
""" % python)
test.write('xxx.in', "xxx.in\n")
-test.write(['subdir', 'SConscript'], """
+test.write(['sub1', 'SConscript'], """
B = Builder(name = 'B', action = r'%s build.py $TARGET $SOURCES')
env = Environment(BUILDERS = [B])
env.B(target = 'xxx.out', source = 'xxx.in')
Default('xxx.out')
""" % python)
-test.write(['subdir', 'xxx.in'], "subdir/xxx.in\n")
+test.write(['sub1', 'xxx.in'], "sub1/xxx.in\n")
test.run() # no arguments, use the Default
test.fail_test(os.path.exists(test.workpath('xxx.out')))
-test.fail_test(test.read(test.workpath('subdir', 'xxx.out')) != "subdir/xxx.in\n")
+test.fail_test(test.read(test.workpath('sub1', 'xxx.out')) != "sub1/xxx.in\n")
+
+
+
+test.subdir('sub2')
+
+test.write('SConstruct', """
+Default('sub2')
+B = Builder(name = 'B', action = r'%s build.py $TARGET $SOURCES')
+env = Environment(BUILDERS = [B])
+env.B(target = 'xxx.out', source = 'xxx.in')
+SConscript('sub2/SConscript')
+""" % python)
+
+test.write('xxx.in', "xxx.in\n")
+
+test.write(['sub2', 'SConscript'], """
+B = Builder(name = 'B', action = r'%s build.py $TARGET $SOURCES')
+env = Environment(BUILDERS = [B])
+env.B(target = 'xxx.out', source = 'xxx.in')
+""" % python)
+
+test.write(['sub2', 'xxx.in'], "sub2/xxx.in\n")
+
+test.run() # no arguments, use the Default
+
+test.fail_test(os.path.exists(test.workpath('xxx.out')))
+test.fail_test(test.read(test.workpath('sub2', 'xxx.out')) != "sub2/xxx.in\n")