diff options
author | Steven Knight <knight@baldmt.com> | 2003-01-25 07:07:02 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-01-25 07:07:02 (GMT) |
commit | 9a87f34a20ea2f5ec420548a379b2818450325ef (patch) | |
tree | 2998d6ced8a67c5fa30e8b47a794399f316d3e94 | |
parent | b0ef6b2dcf13bd6ad09a6b41fbeaee2279e1c6e8 (diff) | |
download | SCons-9a87f34a20ea2f5ec420548a379b2818450325ef.zip SCons-9a87f34a20ea2f5ec420548a379b2818450325ef.tar.gz SCons-9a87f34a20ea2f5ec420548a379b2818450325ef.tar.bz2 |
Fix a bug when -c is used with -n. (Steve Leblanc)
-rw-r--r-- | src/CHANGES.txt | 5 | ||||
-rw-r--r-- | src/engine/SCons/Script/__init__.py | 5 | ||||
-rw-r--r-- | test/option-c.py | 10 |
3 files changed, 18 insertions, 2 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 8f3d990..49346b4 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -42,6 +42,11 @@ RELEASE 0.11 - XXX - 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 diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py index 6ea9a3e..9257266 100644 --- a/src/engine/SCons/Script/__init__.py +++ b/src/engine/SCons/Script/__init__.py @@ -150,12 +150,13 @@ class BuildTask(SCons.Taskmaster.Task): 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: diff --git a/test/option-c.py b/test/option-c.py index 8d7e777..6501d75 100644 --- a/test/option-c.py +++ b/test/option-c.py @@ -187,6 +187,16 @@ 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 Removed %s |