mirror of https://github.com/ArduPilot/ardupilot
waf: added --extra-hwdef option
This commit is contained in:
parent
fb4a4e609a
commit
15cd9d502d
|
@ -383,6 +383,8 @@ def generate_hwdef_h(env):
|
|||
os.mkdir(hwdef_out)
|
||||
python = sys.executable
|
||||
cmd = "{0} '{1}' -D '{2}' '{3}' {4} --params '{5}'".format(python, hwdef_script, hwdef_out, env.HWDEF, env.BOOTLOADER_OPTION, env.DEFAULT_PARAMETERS)
|
||||
if env.HWDEF_EXTRA:
|
||||
cmd += " --extra-hwdef '{0}'".format(env.HWDEF_EXTRA)
|
||||
return subprocess.call(cmd, shell=True)
|
||||
|
||||
def pre_build(bld):
|
||||
|
|
7
wscript
7
wscript
|
@ -262,6 +262,11 @@ configuration in order to save typing.
|
|||
default=False,
|
||||
help='force single precision postype_t')
|
||||
|
||||
g.add_option('--extra-hwdef',
|
||||
action='store',
|
||||
default=None,
|
||||
help='Extra hwdef.dat file for custom build.')
|
||||
|
||||
def _collect_autoconfig_files(cfg):
|
||||
for m in sys.modules.values():
|
||||
paths = []
|
||||
|
@ -308,6 +313,8 @@ def configure(cfg):
|
|||
cfg.env.ENABLE_MALLOC_GUARD = cfg.options.enable_malloc_guard
|
||||
cfg.env.ENABLE_STATS = cfg.options.enable_stats
|
||||
|
||||
cfg.env.HWDEF_EXTRA = cfg.options.extra_hwdef
|
||||
|
||||
cfg.env.OPTIONS = cfg.options.__dict__
|
||||
|
||||
# Allow to differentiate our build from the make build
|
||||
|
|
Loading…
Reference in New Issue