summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-12-22 06:04:55 (GMT)
committerSteven Knight <knight@baldmt.com>2001-12-22 06:04:55 (GMT)
commit475d94a9464a232dacd2f7dfefc6f2e0292f9e2c (patch)
tree0b97739b07d4c7fd27b7332a4013e842157ede1f
parentdaf4a9eeb6adeaaac7026314f2accbed9176afdd (diff)
downloadSCons-475d94a9464a232dacd2f7dfefc6f2e0292f9e2c.zip
SCons-475d94a9464a232dacd2f7dfefc6f2e0292f9e2c.tar.gz
SCons-475d94a9464a232dacd2f7dfefc6f2e0292f9e2c.tar.bz2
Make Default work with subdirectories.
-rw-r--r--src/CHANGES.txt35
-rw-r--r--src/engine/SCons/Script/.aeignore4
-rw-r--r--src/engine/SCons/Script/SConscript.py2
-rw-r--r--test/Default.py28
4 files changed, 51 insertions, 18 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 4f161e4..36d84bf 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -10,21 +10,9 @@
RELEASE 0.02 -
- - Fixed the version comment in the scons.bat (the UNIX geek used
- # instead of @rem).
-
- - Fix to setup.py so it doesn't require a sys.argv[1] argument.
-
- - Provide make-like warning message for "command not found" and
- similar errors.
-
From Charles Crain:
- - Added support for the Install method.
-
- - Added support for the BuildDir method.
-
- - Added the Export method.
+ - Added the Install(), BuildDir(), and Export() methods.
- Fix the -C option by delaying setting the top of the FS tree.
@@ -36,6 +24,21 @@ RELEASE 0.02 -
- Fixed variable substitution in CPPPATH and LIBPATH.
+ From Steven Knight:
+
+ - Fixed the version comment in the scons.bat (the UNIX geek used
+ # instead of @rem).
+
+ - Fix to setup.py so it doesn't require a sys.argv[1] argument.
+
+ - Provide make-like warning message for "command not found" and
+ similar errors.
+
+ - Added an EXAMPLES section to the man page.
+
+ - Make Default() targets properly relative to their SConscript
+ file's subdirectory.
+
From Anthony Roach:
- Documented CXXFLAGS, CXXCOM, and CPPPATH.
@@ -44,11 +47,9 @@ RELEASE 0.02 -
- Made Default() accept Nodes as arguments.
- - Changed Export() to make it easier to use
-
- - Added Import() method.
+ - Changed Export() to make it easier to use.
- - Added Return() method.
+ - Added the Import() and Return() methods.
diff --git a/src/engine/SCons/Script/.aeignore b/src/engine/SCons/Script/.aeignore
new file mode 100644
index 0000000..43fe851
--- /dev/null
+++ b/src/engine/SCons/Script/.aeignore
@@ -0,0 +1,4 @@
+*,D
+*.pyc
+.*.swp
+.consign
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py
index 5fc5487..924fd29 100644
--- a/src/engine/SCons/Script/SConscript.py
+++ b/src/engine/SCons/Script/SConscript.py
@@ -114,7 +114,7 @@ def Default(*targets):
default_targets.append(t)
else:
for s in string.split(t):
- default_targets.append(s)
+ default_targets.append(SCons.Node.FS.default_fs.File(s))
def Help(text):
if print_help:
diff --git a/test/Default.py b/test/Default.py
index 135d7cb..5685c3d 100644
--- a/test/Default.py
+++ b/test/Default.py
@@ -98,4 +98,32 @@ test.fail_test(test.read(test.workpath('four', 'foo.out')) != "four/foo.in\n")
test.fail_test(test.read(test.workpath('four', 'bar.out')) != "four/bar.in\n")
+
+test.subdir('subdir')
+
+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')
+""" % python)
+
+test.write('xxx.in', "xxx.in\n")
+
+test.write(['subdir', '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.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.pass_test()