mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
waf: make board name case insensitive in waf configure
This commit is contained in:
parent
8d4215fd82
commit
102141756a
@ -294,6 +294,15 @@ Please use a replacement build as follows:
|
|||||||
px4-v4pro Use DrotekP3Pro build
|
px4-v4pro Use DrotekP3Pro build
|
||||||
''' % ctx.env.BOARD)
|
''' % ctx.env.BOARD)
|
||||||
|
|
||||||
|
boards = _board_classes.keys()
|
||||||
|
if not ctx.env.BOARD in boards:
|
||||||
|
# try case-insensitive match
|
||||||
|
for b in boards:
|
||||||
|
if b.upper() == ctx.env.BOARD.upper():
|
||||||
|
ctx.env.BOARD = b
|
||||||
|
break
|
||||||
|
if not ctx.env.BOARD in boards:
|
||||||
|
ctx.fatal("Invalid board '%s': choices are %s" % (ctx.env.BOARD, ', '.join(boards)))
|
||||||
_board = _board_classes[ctx.env.BOARD]()
|
_board = _board_classes[ctx.env.BOARD]()
|
||||||
return _board
|
return _board
|
||||||
|
|
||||||
|
1
wscript
1
wscript
@ -68,7 +68,6 @@ def options(opt):
|
|||||||
removed_names = boards.get_removed_boards()
|
removed_names = boards.get_removed_boards()
|
||||||
g.add_option('--board',
|
g.add_option('--board',
|
||||||
action='store',
|
action='store',
|
||||||
choices=boards_names + removed_names,
|
|
||||||
default=None,
|
default=None,
|
||||||
help='Target board to build, choices are %s.' % ', '.join(boards_names))
|
help='Target board to build, choices are %s.' % ', '.join(boards_names))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user