From: stevenknight Date: Wed, 24 Mar 2004 14:08:12 +0000 (+0000) Subject: Add --debug=presub to the help text. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1eda2753eec5c8230a1f995ce5fd797a6623bf84;p=scons.git Add --debug=presub to the help text. git-svn-id: http://scons.tigris.org/svn/scons/trunk@929 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 8eef6a76..c421d120 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -27,6 +27,10 @@ RELEASE 0.96 - XXX - Fix use of $MSVS_IGNORE_IDE_PATHS, which was broken when we added support for $MSVS_USE_MFC_DIRS last release. + From Gary Oberbrunner: + + - Add a --debug=presub option to print actions prior to substitution. + RELEASE 0.95 - Mon, 08 Mar 2004 06:43:20 -0600 diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py index c59ce69a..52d0db21 100644 --- a/src/engine/SCons/Script/__init__.py +++ b/src/engine/SCons/Script/__init__.py @@ -493,9 +493,11 @@ class OptParser(OptionParser): help="Search up directory tree for SConstruct, " "build all Default() targets.") - def opt_debug(option, opt, value, parser): - if value in ["count", "dtree", "includes", "memory", "objects", - "pdb", "presub", "time", "tree"]: + debug_options = ["count", "dtree", "includes", "memory", "objects", + "pdb", "presub", "time", "tree"] + + def opt_debug(option, opt, value, parser, debug_options=debug_options): + if value in debug_options: setattr(parser.values, 'debug', value) else: raise OptionValueError("Warning: %s is not a valid debug type" % value) @@ -503,7 +505,7 @@ class OptParser(OptionParser): callback=opt_debug, nargs=1, dest="debug", metavar="TYPE", help="Print various types of debugging information: " - "count, dtree, includes, memory, objects, pdb, time, tree.") + "%s." % string.join(debug_options, ", ")) self.add_option('-f', '--file', '--makefile', '--sconstruct', action="append", nargs=1,