mirror of https://github.com/ArduPilot/ardupilot
waf: add option --no-submodule-update
That is useful when the user wants to build with one or more submodules at a specific revision. In case of a developer, that is useful for when a submodule is in modification process and she needs to (constantly) test the build.
This commit is contained in:
parent
9bb039accd
commit
3566052d6a
17
wscript
17
wscript
|
@ -54,6 +54,13 @@ def options(opt):
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help='Output all test programs')
|
help='Output all test programs')
|
||||||
|
|
||||||
|
g.add_option('--no-submodule-update',
|
||||||
|
dest='submodule_update',
|
||||||
|
action='store_false',
|
||||||
|
default=True,
|
||||||
|
help='Don\'t update git submodules. Useful for building ' +
|
||||||
|
'with submodules at specific revisions.')
|
||||||
|
|
||||||
def configure(cfg):
|
def configure(cfg):
|
||||||
cfg.env.BOARD = cfg.options.board
|
cfg.env.BOARD = cfg.options.board
|
||||||
# use a different variant for each board
|
# use a different variant for each board
|
||||||
|
@ -97,6 +104,9 @@ def configure(cfg):
|
||||||
'SKETCHBOOK="' + cfg.srcnode.abspath() + '"',
|
'SKETCHBOOK="' + cfg.srcnode.abspath() + '"',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
if cfg.options.submodule_update:
|
||||||
|
cfg.env.SUBMODULE_UPDATE = [True]
|
||||||
|
|
||||||
def collect_dirs_to_recurse(bld, globs, **kw):
|
def collect_dirs_to_recurse(bld, globs, **kw):
|
||||||
dirs = []
|
dirs = []
|
||||||
globs = Utils.to_list(globs)
|
globs = Utils.to_list(globs)
|
||||||
|
@ -198,9 +208,10 @@ def build(bld):
|
||||||
|
|
||||||
_build_cmd_tweaks(bld)
|
_build_cmd_tweaks(bld)
|
||||||
|
|
||||||
bld.add_group('git_submodules')
|
if bld.env.SUBMODULE_UPDATE:
|
||||||
for name in bld.env.GIT_SUBMODULES:
|
bld.add_group('git_submodules')
|
||||||
bld.git_submodule(name)
|
for name in bld.env.GIT_SUBMODULES:
|
||||||
|
bld.git_submodule(name)
|
||||||
|
|
||||||
bld.add_group('dynamic_sources')
|
bld.add_group('dynamic_sources')
|
||||||
_build_dynamic_sources(bld)
|
_build_dynamic_sources(bld)
|
||||||
|
|
Loading…
Reference in New Issue