mirror of https://github.com/ArduPilot/ardupilot
waf: Fail if custom hwdef file doesn't exist
Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
This commit is contained in:
parent
b4df082618
commit
0725109d1c
3
wscript
3
wscript
|
@ -506,6 +506,9 @@ def configure(cfg):
|
||||||
cfg.env.ENABLE_STATS = cfg.options.enable_stats
|
cfg.env.ENABLE_STATS = cfg.options.enable_stats
|
||||||
cfg.env.SAVE_TEMPS = cfg.options.save_temps
|
cfg.env.SAVE_TEMPS = cfg.options.save_temps
|
||||||
|
|
||||||
|
extra_hwdef = cfg.options.extra_hwdef
|
||||||
|
if extra_hwdef is not None and not os.path.exists(extra_hwdef):
|
||||||
|
raise FileNotFoundError(f"extra-hwdef file NOT found: '{cfg.options.extra_hwdef}'")
|
||||||
cfg.env.HWDEF_EXTRA = cfg.options.extra_hwdef
|
cfg.env.HWDEF_EXTRA = cfg.options.extra_hwdef
|
||||||
if cfg.env.HWDEF_EXTRA:
|
if cfg.env.HWDEF_EXTRA:
|
||||||
cfg.env.HWDEF_EXTRA = os.path.abspath(cfg.env.HWDEF_EXTRA)
|
cfg.env.HWDEF_EXTRA = os.path.abspath(cfg.env.HWDEF_EXTRA)
|
||||||
|
|
Loading…
Reference in New Issue