- Make sure side-effect nodes are prepare()d before building their
corresponding target.
+ - Preserve the ability to call BuildDir() multiple times with the
+ same target and source directory arguments.
+
From Scott Lystig Fritchie:
- Fix the ability to use a custom _concat() function in the
if src_dir.is_under(build_dir):
raise SCons.Errors.UserError, "Source directory cannot be under build directory."
if build_dir.srcdir:
+ if build_dir.srcdir == src_dir:
+ return # We already did this.
raise SCons.Errors.UserError, "'%s' already has a source directory: '%s'."%(build_dir, build_dir.srcdir)
build_dir.link(src_dir, duplicate)
test.unlink( "src/foo" )
test.unlink( "build/foo" )
+ fs = SCons.Node.FS.FS()
+ fs.BuildDir('build', 'src1')
+
+ # Calling the same BuildDir twice should work fine.
+ fs.BuildDir('build', 'src1')
+
+ # Trying to move a build dir to a second source dir
+ # should blow up
+ try:
+ fs.BuildDir('build', 'src2')
+ except SCons.Errors.UserError:
+ pass
+ else:
+ assert 0, "Should have caught a UserError."
+
# Test against a former bug. Make sure we can get a repository
# path for the build directory itself!
fs=SCons.Node.FS.FS(test.workpath('work'))