summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-02-21 22:30:24 (GMT)
committerSteven Knight <knight@baldmt.com>2002-02-21 22:30:24 (GMT)
commit514955d91597edc49a05e5260caaca8db7506ab7 (patch)
treedd3154bcbb6b4bc9a5b37c42ebf5d481480b528a /src
parent53bf767e4ba2810d5880d319cc9ac2bf4d4f2590 (diff)
downloadSCons-514955d91597edc49a05e5260caaca8db7506ab7.zip
SCons-514955d91597edc49a05e5260caaca8db7506ab7.tar.gz
SCons-514955d91597edc49a05e5260caaca8db7506ab7.tar.bz2
Add the -q option.
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt2
-rw-r--r--src/RELEASE.txt2
-rw-r--r--src/engine/SCons/Script/__init__.py16
3 files changed, 18 insertions, 2 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 4643b9a..33a4a40 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -73,6 +73,8 @@ RELEASE 0.05 -
- Fix the --debug=pdb option when run on Windows NT.
+ - Add support for the -q option.
+
From Steve Leblanc:
- Add support for the -u option.
diff --git a/src/RELEASE.txt b/src/RELEASE.txt
index 358a359..f257e84 100644
--- a/src/RELEASE.txt
+++ b/src/RELEASE.txt
@@ -98,7 +98,7 @@ RELEASE 0.04 - Wed, 30 Jan 2002 11:09:42 -0600
- No support yet for the following command-line options:
-d -e -l --list-actions --list-derived --list-where
- -o -p -q -r -R --random -w --write-filenames -W
+ -o -p -r -R --random -w --write-filenames -W
--warn-undefined-variables
Thank you for your interest, and please let us know how we can help
diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py
index 529729e..84882f4 100644
--- a/src/engine/SCons/Script/__init__.py
+++ b/src/engine/SCons/Script/__init__.py
@@ -120,6 +120,16 @@ class CleanTask(SCons.Taskmaster.Task):
except IndexError:
pass
+class QuestionTask(SCons.Taskmaster.Task):
+ """An SCons task for the -q (question) option."""
+ def execute(self):
+ if self.targets[0].get_state() != SCons.Node.up_to_date:
+ global exit_status
+ exit_status = 1
+ self.tm.stop()
+
+ def executed(self):
+ pass
# Global variables
@@ -501,7 +511,11 @@ def options_init():
short = 'p',
help = "Print internal environments/objects.")
- Option(func = opt_not_yet, future = 1,
+ def opt_q(opt, arg):
+ global task_class
+ task_class = QuestionTask
+
+ Option(func = opt_q, future = 1,
short = 'q', long = ['question'],
help = "Don't build; exit status says if up to date.")