waf: throw an error if hwdef.dat can't be processed

This commit is contained in:
Andrew Tridgell 2018-03-08 08:37:42 +11:00
parent 5f29524a41
commit c50359a5b5

View File

@ -232,7 +232,9 @@ def configure(cfg):
cmd = 'python %s -D %s %s' % (hwdef_script, hwdef_out, hwdef)
ret = subprocess.call(cmd, shell=True)
except Exception:
print("Failed to generate hwdef.h")
cfg.fatal("Failed to process hwdef.dat")
if ret != 0:
cfg.fatal("Failed to process hwdef.dat ret=%d" % ret)
load_env_vars(cfg.env)
if env.HAL_WITH_UAVCAN: