aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2019-02-07 14:23:16 -0800
committerEddie Hung <eddieh@ece.ubc.ca>2019-02-07 14:23:16 -0800
commit54d75e8cfec1957778f159876047dbdc476fac84 (patch)
treea29190ed4e5b113b89e345775fc6d5d300c8fa6c
parentdf753e799b3210e82fd0c46faec070ba07cb1e43 (diff)
downloadnextpnr-tests-54d75e8cfec1957778f159876047dbdc476fac84.tar.gz
nextpnr-tests-54d75e8cfec1957778f159876047dbdc476fac84.tar.bz2
nextpnr-tests-54d75e8cfec1957778f159876047dbdc476fac84.zip
Better error messaging for empty/invalid NPNR
-rw-r--r--ice40/regressions/Makefile9
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