- Change the default SConscriptChdir() behavior to change to the
SConscript directory while it's being read.
+ - Fix an exception thrown when the -U option was used with no
+ Default() target specified.
+
From Lachlan O'Dea:
- Add SharedObject() support to the masm tool.
# or not a file, so go ahead and keep it as a default
# target and let the engine sort it out:
return 1
- default_targets = filter(check_dir, default_targets)
+ if default_targets is None:
+ default_targets = []
+ else:
+ default_targets = filter(check_dir, default_targets)
SCons.Script.SConscript.default_targets = default_targets
target_top = None
test.unlink(['sub1', 'foo.out'])
test.write('SConscript', """assert GetLaunchDir() == r'%s'"""%test.workpath('sub1'))
-test.run(arguments = '-U', chdir = 'sub1', stderr = None, status = 2)
+test.run(arguments = '-U',
+ chdir = 'sub1',
+ stderr = "scons: *** No targets specified and no Default() targets found. Stop.\n",
+ status = 2)
test.fail_test(os.path.exists(test.workpath('sub1', 'foo.out')))
test.fail_test(os.path.exists(test.workpath('sub2', 'bar.out')))
test.fail_test(os.path.exists(test.workpath('sub2b', 'bar.out')))
test.fail_test(os.path.exists(test.workpath('bar.out')))
test.fail_test(os.path.exists(test.workpath('sub2/xxx.out')))
-
# Make sure that a Default() directory doesn't cause an exception.
test.subdir('sub4')
test.run(chdir = 'sub4', arguments = '-U')
+# Make sure no Default() targets doesn't cause an exception.
+test.subdir('sub5')
+
+test.write(['sub5', 'SConstruct'], "\n")
+
+test.run(chdir = 'sub5',
+ arguments = '-U',
+ stderr = "scons: *** No targets specified and no Default() targets found. Stop.\n",
+ status = 2)
+
+#
test.write('SConstruct', """
Default('not_a_target.in')
""")