mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-25 11:19:52 +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('--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('--profile', dest='profile', default=0, action='store_true', help=argparse.SUPPRESS)
|
||||||
p('--pdb', dest='pdb', 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')
|
gr = self.add_option_group('Configuration options')
|
||||||
|
|
||||||
|
@ -51,6 +51,9 @@ def waf_entry_point(current_directory, version, wafdir):
|
|||||||
|
|
||||||
ctx = Context.create_context('options')
|
ctx = Context.create_context('options')
|
||||||
(options, commands) = ctx.parse_cmd_args(allow_unknown=True)
|
(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:
|
if options.top:
|
||||||
start_dir = Context.run_dir = Context.top_dir = options.top
|
start_dir = Context.run_dir = Context.top_dir = options.top
|
||||||
no_climb = True
|
no_climb = True
|
||||||
|
Loading…
Reference in New Issue
Block a user