summaryrefslogtreecommitdiff
path: root/engine/SCons/Script/SConsOptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Script/SConsOptions.py')
-rw-r--r--engine/SCons/Script/SConsOptions.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/engine/SCons/Script/SConsOptions.py b/engine/SCons/Script/SConsOptions.py
index ae08d41..e7a3fc1 100644
--- a/engine/SCons/Script/SConsOptions.py
+++ b/engine/SCons/Script/SConsOptions.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/SConsOptions.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
+__revision__ = "src/engine/SCons/Script/SConsOptions.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import optparse
import re
@@ -584,9 +584,15 @@ def Parser(version):
help="Print build actions for files from CacheDir.")
def opt_invalid(group, value, options):
+ """report an invalid option from a group"""
errmsg = "`%s' is not a valid %s option type, try:\n" % (value, group)
return errmsg + " %s" % ", ".join(options)
+ def opt_invalid_rm(group, value, msg):
+ """report an invalid option from a group: recognized but removed"""
+ errmsg = "`%s' is not a valid %s option type " % (value, group)
+ return errmsg + msg
+
config_options = ["auto", "force" ,"cache"]
opt_config_help = "Controls Configure subsystem: %s." \
@@ -604,9 +610,11 @@ def Parser(version):
help="Search up directory tree for SConstruct, "
"build all Default() targets.")
- deprecated_debug_options = {
+ deprecated_debug_options = {}
+
+ removed_debug_options = {
"dtree" : '; please use --tree=derived instead',
- "nomemoizer" : ' and has no effect',
+ "nomemoizer" : '; there is no replacement',
"stree" : '; please use --tree=all,status instead',
"tree" : '; please use --tree=all instead',
}
@@ -614,15 +622,16 @@ def Parser(version):
debug_options = ["count", "duplicate", "explain", "findlibs",
"includes", "memoizer", "memory", "objects",
"pdb", "prepare", "presub", "stacktrace",
- "time"]
+ "time", "action-timestamps"]
def opt_debug(option, opt, value__, parser,
debug_options=debug_options,
- deprecated_debug_options=deprecated_debug_options):
+ deprecated_debug_options=deprecated_debug_options,
+ removed_debug_options=removed_debug_options):
for value in value__.split(','):
if value in debug_options:
parser.values.debug.append(value)
- elif value in list(deprecated_debug_options.keys()):
+ elif value in deprecated_debug_options:
parser.values.debug.append(value)
try:
parser.values.delayed_warnings
@@ -632,6 +641,9 @@ def Parser(version):
w = "The --debug=%s option is deprecated%s." % (value, msg)
t = (SCons.Warnings.DeprecatedDebugOptionsWarning, w)
parser.values.delayed_warnings.append(t)
+ elif value in removed_debug_options:
+ msg = removed_debug_options[value]
+ raise OptionValueError(opt_invalid_rm('debug', value, msg))
else:
raise OptionValueError(opt_invalid('debug', value, debug_options))