diff options
| author | Steven Knight <knight@baldmt.com> | 2004-04-03 07:47:40 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2004-04-03 07:47:40 (GMT) |
| commit | e3395e16f968f033c77090aa8b4212c0f89ebf6a (patch) | |
| tree | 07a84c902f1d074daa9914244bf8546ce7917596 /src | |
| parent | fd66a638d425a722b4e84b57d7a40860d06c9d49 (diff) | |
| download | SCons-e3395e16f968f033c77090aa8b4212c0f89ebf6a.zip SCons-e3395e16f968f033c77090aa8b4212c0f89ebf6a.tar.gz SCons-e3395e16f968f033c77090aa8b4212c0f89ebf6a.tar.bz2 | |
Put the --duplicate option in alphabetical order in the help output.
Diffstat (limited to 'src')
| -rw-r--r-- | src/engine/SCons/Script/__init__.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py index 52d0db2..a536366 100644 --- a/src/engine/SCons/Script/__init__.py +++ b/src/engine/SCons/Script/__init__.py @@ -507,6 +507,18 @@ class OptParser(OptionParser): help="Print various types of debugging information: " "%s." % string.join(debug_options, ", ")) + def opt_duplicate(option, opt, value, parser): + if not value in SCons.Node.FS.Valid_Duplicates: + raise OptionValueError("`%s' is not a valid duplication style." % value) + setattr(parser.values, 'duplicate', value) + # Set the duplicate style right away so it can affect linking + # of SConscript files. + SCons.Node.FS.set_duplicate(value) + self.add_option('--duplicate', action="callback", type="string", + callback=opt_duplicate, nargs=1, dest="duplicate", + help="Set the preferred duplication methods. Must be one of " + + string.join(SCons.Node.FS.Valid_Duplicates, ", ")) + self.add_option('-f', '--file', '--makefile', '--sconstruct', action="append", nargs=1, help="Read FILE as the top-level SConstruct file.") @@ -613,17 +625,6 @@ class OptParser(OptionParser): # "LOAD-AVERAGE." # type="int", help=SUPPRESS_HELP) - def opt_duplicate(option, opt, value, parser): - if not value in SCons.Node.FS.Valid_Duplicates: - raise OptionValueError("`%s' is not a valid duplication style." % value) - setattr(parser.values, 'duplicate', value) - # Set the duplicate stye right away so it can affect linking - # of SConscript files. - SCons.Node.FS.set_duplicate(value) - self.add_option('--duplicate', action="callback", type="string", - callback=opt_duplicate, nargs=1, dest="duplicate", - help="Set the preferred duplication methods. Must be one of " - + string.join(SCons.Node.FS.Valid_Duplicates, ", ")) self.add_option('--list-derived', action="callback", callback=opt_not_yet, # help="Don't build; list files that would be built." |
