- Provide a more useful error message if a construction variable
expansion contains a syntax error during evaluation.
+ - Fix transparent checkout of implicit dependency files from SCCS
+ and RCS.
+
From Vincent Risi:
- Add support for the bcc32, ilink32 and tlib Borland tools.
for dir in paths:
try:
node = node_factory(filename, dir)
- # Return true of the node exists or is a derived node.
+ # Return true if the node exists or is a derived node.
if node.is_derived() or \
+ node.is_pseudo_derived() or \
(isinstance(node, SCons.Node.FS.Base) and node.exists()):
retval = node
break
os.chdir(test.workpath("")) # FS doesn't like the cwd to be something other than it's root
node_derived = fs.File(test.workpath('bar/baz'))
node_derived.builder_set(1) # Any non-zero value.
+ node_pseudo = fs.File(test.workpath('pseudo'))
+ node_pseudo.set_src_builder(1) # Any non-zero value.
paths = map(fs.Dir, ['.', './bar'])
nodes = [SCons.Node.FS.find_file('foo', paths, fs.File),
- SCons.Node.FS.find_file('baz', paths, fs.File)]
+ SCons.Node.FS.find_file('baz', paths, fs.File),
+ SCons.Node.FS.find_file('pseudo', paths, fs.File)]
file_names = map(str, nodes)
file_names = map(os.path.normpath, file_names)
assert os.path.normpath('./foo') in file_names, file_names
assert os.path.normpath('./bar/baz') in file_names, file_names
+ assert os.path.normpath('./pseudo') in file_names, file_names
class StringDirTestCase(unittest.TestCase):
def runTest(self):
mode = os.stat(file)[stat.ST_MODE]
return mode & stat.S_IWUSR
+
+
# Test explicit checkouts from local RCS files.
test.subdir('work1', ['work1', 'sub'])
test.fail_test(is_writable(test.workpath('work1', 'sub', 'ddd.in')))
test.fail_test(is_writable(test.workpath('work1', 'sub', 'fff.in')))
+
+
# Test transparent RCS checkouts from an RCS subdirectory.
test.subdir('work2', ['work2', 'RCS'],
['work2', 'sub'], ['work2', 'sub', 'RCS'])
test.fail_test(not is_writable(test.workpath('work2', 'sub', 'ddd.in')))
test.fail_test(not is_writable(test.workpath('work2', 'sub', 'fff.in')))
+
+
+# Test transparent RCS checkouts of implicit dependencies.
+test.subdir('work3', ['work3', 'RCS'])
+
+test.write(['work3', 'foo.c'], """\
+#include "foo.h"
+int
+main(int argc, char *argv[]) {
+ printf(STR);
+ printf("work3/foo.c\\n");
+}
+""")
+test.run(chdir = 'work3',
+ program = ci,
+ arguments = "-f -tfoo.c foo.c",
+ stderr = None)
+
+test.write(['work3', 'foo.h'], """\
+#define STR "work3/foo.h\\n"
+""")
+test.run(chdir = 'work3',
+ program = ci,
+ arguments = "-f -tfoo.h foo.h",
+ stderr = None)
+
+test.write(['work3', 'SConstruct'], """
+env = Environment()
+env.Program('foo.c')
+""")
+
+test.run(chdir='work3', stderr="""\
+RCS/foo.c,v --> foo.c
+revision 1.1
+done
+RCS/foo.h,v --> foo.h
+revision 1.1
+done
+""")
+
+
+
#
test.pass_test()
mode = os.stat(file)[stat.ST_MODE]
return mode & stat.S_IWUSR
+
+
# Test explicit checkouts from local SCCS files.
test.subdir('work1', ['work1', 'sub'])
test.fail_test(not is_writable(test.workpath('work1', 'sub', 'ddd.in')))
test.fail_test(not is_writable(test.workpath('work1', 'sub', 'fff.in')))
+
+
# Test transparent checkouts from SCCS files in an SCCS subdirectory.
test.subdir('work2', ['work2', 'SCCS'],
['work2', 'sub'], ['work2', 'sub', 'SCCS'])
test.fail_test(is_writable(test.workpath('work2', 'sub', 'ddd.in')))
test.fail_test(is_writable(test.workpath('work2', 'sub', 'fff.in')))
+
+
+
+# Test transparent SCCS checkouts of implicit dependencies.
+test.subdir('work3', ['work3', 'SCCS'])
+
+test.write(['work3', 'foo.c'], """\
+#include "foo.h"
+int
+main(int argc, char *argv[]) {
+ printf(STR);
+ printf("work3/foo.c\\n");
+}
+""")
+test.run(chdir = 'work3',
+ program = sccs,
+ arguments = "create foo.c",
+ stderr = None)
+test.unlink(['work3', 'foo.c'])
+test.unlink(['work3', ',foo.c'])
+
+test.write(['work3', 'foo.h'], """\
+#define STR "work3/foo.h\\n"
+""")
+test.run(chdir = 'work3',
+ program = sccs,
+ arguments = "create foo.h",
+ stderr = None)
+test.unlink(['work3', 'foo.h'])
+test.unlink(['work3', ',foo.h'])
+
+test.write(['work3', 'SConstruct'], """
+env = Environment()
+env.Program('foo.c')
+""")
+
+test.run(chdir='work3', stderr = """\
+foo.c 1.1: 6 lines
+foo.h 1.1: 1 lines
+""")
+
+
+
test.pass_test()