From 3f6d48f2fc51504619cf3c68f8bf04cc39070628 Mon Sep 17 00:00:00 2001 From: Michael Neuling Date: Mon, 22 Jun 2020 13:09:09 +1000 Subject: [PATCH] Build to tmp file so nextpnr errors don't confuse make nextpnr will leave an output file around even when it errors out, so build to a tmp file and move it when we succeed so we don't confuse make. Signed-off-by: Michael Neuling --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b4dab31..3365293 100644 --- a/Makefile +++ b/Makefile @@ -187,7 +187,8 @@ microwatt-verilator: microwatt.v verilator/microwatt-verilator.cpp verilator/uar @cp -f obj_dir/microwatt-verilator microwatt-verilator microwatt_out.config: microwatt.json $(LPF) - $(NEXTPNR) --json $< --lpf $(LPF) --textcfg $@ $(NEXTPNR_FLAGS) --package $(PACKAGE) + $(NEXTPNR) --json $< --lpf $(LPF) --textcfg $@.tmp $(NEXTPNR_FLAGS) --package $(PACKAGE) + mv -f $@.tmp $@ microwatt.bit: microwatt_out.config $(ECPPACK) --svf microwatt.svf $< $@