From 54d75e8cfec1957778f159876047dbdc476fac84 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Thu, 7 Feb 2019 14:23:16 -0800 Subject: Better error messaging for empty/invalid NPNR --- ice40/regressions/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ice40/regressions/Makefile') 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 -- cgit v1.2.3