summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-03-31 06:03:14 (GMT)
committerSteven Knight <knight@baldmt.com>2002-03-31 06:03:14 (GMT)
commita7669bc6a02999a3375c7e732a27ded5f9bb9935 (patch)
tree61beac46b020f72a91ce050f1dd1c6f407015352 /src
parent37bd22efa578e0c407a4e50fd3c40e20193a9260 (diff)
downloadSCons-a7669bc6a02999a3375c7e732a27ded5f9bb9935.zip
SCons-a7669bc6a02999a3375c7e732a27ded5f9bb9935.tar.gz
SCons-a7669bc6a02999a3375c7e732a27ded5f9bb9935.tar.bz2
Make -c work with -n: don't remove the files!
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt8
-rw-r--r--src/engine/SCons/Script/__init__.py9
2 files changed, 16 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index c78106b..0fc473c 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -8,6 +8,14 @@
+RELEASE 0.07 -
+
+ From Steven Knight:
+
+ - Fix so that -c -n does *not* remove the targets!
+
+
+
RELEASE 0.06 - Thu, 28 Mar 2002 01:24:29 -0600
From Charles Crain:
diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py
index 6866e35..bd4f2ae 100644
--- a/src/engine/SCons/Script/__init__.py
+++ b/src/engine/SCons/Script/__init__.py
@@ -103,7 +103,11 @@ class BuildTask(SCons.Taskmaster.Task):
class CleanTask(SCons.Taskmaster.Task):
"""An SCons clean task."""
- def execute(self):
+ def show(self):
+ if self.targets[0].builder:
+ print "Removed " + self.targets[0].path
+
+ def remove(self):
if self.targets[0].builder:
try:
os.unlink(self.targets[0].path)
@@ -120,6 +124,8 @@ class CleanTask(SCons.Taskmaster.Task):
except IndexError:
pass
+ execute = remove
+
class QuestionTask(SCons.Taskmaster.Task):
"""An SCons task for the -q (question) option."""
def execute(self):
@@ -494,6 +500,7 @@ def options_init():
def opt_n(opt, arg):
SCons.Action.execute_actions = None
+ CleanTask.execute = CleanTask.show
Option(func = opt_n,
short = 'n', long = ['no-exec', 'just-print', 'dry-run', 'recon'],