Skip to content

Commit

Permalink
waf: Fail if custom hwdef file doesn't exist
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
  • Loading branch information
Ryanf55 committed Oct 23, 2024
1 parent a22e28c commit 8d797d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8d797d1

Please sign in to comment.