mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 01:46:15 +01:00
Print waf version
This commit is contained in:
parent
66a013ed28
commit
4d0edd113a
@ -134,7 +134,8 @@ class OptionsContext(Context.Context):
|
||||
p('--zones', dest='zones', default='', action='store', help='debugging zones (task_gen, deps, tasks, etc)')
|
||||
p('--profile', dest='profile', default=0, action='store_true', help=argparse.SUPPRESS)
|
||||
p('--pdb', dest='pdb', default=0, action='store_true', help=argparse.SUPPRESS)
|
||||
p('-h', '--help', dest='whelp', default=0, action='store_true', help="show this help message and exit")
|
||||
p('-h', '--help', dest='whelp', default=0, action='store_true', help='show this help message and exit')
|
||||
p('--version', dest='version', default=False, action='store_true', help='show the Waf version and exit')
|
||||
|
||||
gr = self.add_option_group('Configuration options')
|
||||
|
||||
|
@ -51,6 +51,9 @@ def waf_entry_point(current_directory, version, wafdir):
|
||||
|
||||
ctx = Context.create_context('options')
|
||||
(options, commands) = ctx.parse_cmd_args(allow_unknown=True)
|
||||
if options.version:
|
||||
print('%s %s (%s)'%(Context.WAFNAME, Context.WAFVERSION, Context.WAFREVISION))
|
||||
sys.exit(0)
|
||||
if options.top:
|
||||
start_dir = Context.run_dir = Context.top_dir = options.top
|
||||
no_climb = True
|
||||
|
Loading…
Reference in New Issue
Block a user