diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2019-02-07 14:23:16 -0800 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2019-02-07 14:23:16 -0800 |
commit | 54d75e8cfec1957778f159876047dbdc476fac84 (patch) | |
tree | a29190ed4e5b113b89e345775fc6d5d300c8fa6c /ice40/regressions/Makefile | |
parent | df753e799b3210e82fd0c46faec070ba07cb1e43 (diff) | |
download | nextpnr-tests-54d75e8cfec1957778f159876047dbdc476fac84.tar.gz nextpnr-tests-54d75e8cfec1957778f159876047dbdc476fac84.tar.bz2 nextpnr-tests-54d75e8cfec1957778f159876047dbdc476fac84.zip |
Better error messaging for empty/invalid NPNR
Diffstat (limited to 'ice40/regressions/Makefile')
-rw-r--r-- | ice40/regressions/Makefile | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ice40/regressions/Makefile b/ice40/regressions/Makefile index b1f81b6..82f0510 100644 --- a/ice40/regressions/Makefile +++ b/ice40/regressions/Makefile @@ -9,6 +9,15 @@ SH_OUTPUT := $(patsubst %.sh,%.log,$(SH)) all: $(JSON_OUTPUT) $(SH_OUTPUT) +ifeq ($(NPNR),) + $(error "$$(NPNR) must point to a nextpnr-ice40 binary (currently: empty)") +endif + +$(NPNR): +ifeq ($(wildcard $(NPNR)),) + $(error "$$(NPNR) must point to a nextpnr-ice40 binary (currently: $@)") +endif + $(JSON_OUTPUT): %.log: %.json $(wildcard %.pcf) $(wildcard %.npnr) $(NPNR) $(NPNR) --json $(word 1,$^) $(if $(wildcard $*.pcf),--pcf $*.pcf,) $(if $(wildcard $*.npnr),$(shell cat $*.npnr),) > $@ 2>&1 |