- Fix adding a prefix to a file when the target isn't specified.
(Bug reported by Esa Ilari Vuokko.)
+ From Steve Leblanc:
+
+ - Fix the output of -c -n when directories are involved, so it
+ matches -c.
+
From Anthony Roach:
- Use a different static object suffix (.os) when using gcc so shared
class CleanTask(SCons.Taskmaster.Task):
"""An SCons clean task."""
def show(self):
- if self.targets[0].has_builder() or self.targets[0].side_effect:
+ if (self.targets[0].has_builder() or self.targets[0].side_effect) \
+ and not os.path.isdir(str(self.targets[0])):
display("Removed " + str(self.targets[0]))
if SCons.Script.SConscript.clean_targets.has_key(str(self.targets[0])):
files = SCons.Script.SConscript.clean_targets[str(self.targets[0])]
for f in files:
- SCons.Utils.fs_delete(str(f), 0)
+ SCons.Util.fs_delete(str(f), 0)
def remove(self):
if self.targets[0].has_builder() or self.targets[0].side_effect:
test.run(arguments = '-c subd', stdout=expect)
test.fail_test(os.path.exists(test.workpath('foox.in')))
+expect = test.wrap_stdout("""Removed foo1.out
+Removed foo2.xxx
+Removed foo2.out
+Removed foo3.out
+Removed %s
+Removed %s
+Removed directory subd
+""" % (os.path.join('subd','foon.in'), os.path.join('subd', 'SConscript')))
+test.run(arguments = '-c -n .', stdout=expect)
+
expect = test.wrap_stdout("""Removed foo1.out
Removed foo2.out
Removed foo3.out