From 0725109d1cf56efa210704c301c48accb360342b Mon Sep 17 00:00:00 2001 From: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com> Date: Wed, 23 Oct 2024 18:01:57 +0900 Subject: [PATCH] waf: Fail if custom hwdef file doesn't exist Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com> --- wscript | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wscript b/wscript index 89ab8961fb..f400c74cdb 100644 --- a/wscript +++ b/wscript @@ -506,6 +506,9 @@ def configure(cfg): cfg.env.ENABLE_STATS = cfg.options.enable_stats 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 if cfg.env.HWDEF_EXTRA: cfg.env.HWDEF_EXTRA = os.path.abspath(cfg.env.HWDEF_EXTRA)