Makefile: Fix synthesis dependencies

Using -s /dev/stdin will add a dependency on it, and /dev/stdin is
always considered newer than the synthesis output. Just use multiple
-p options.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
Sean Anderson 2023-02-18 21:20:53 -05:00
parent d98e7b3adf
commit 0511de1e9c
1 changed files with 4 additions and 5 deletions

View File

@ -20,11 +20,10 @@ log:
LIBDIRS := rtl lib/verilog-lfsr/rtl
%.synth.json: %.v | log
( \
echo "read_verilog -sv $<"; \
echo "hierarchy $(addprefix -libdir ,$(LIBDIRS) $(<D))"; \
echo "synth_ice40 -top $(*F)"; \
) | $(SYNTH) -q -E $@.d -s /dev/stdin -b json -o $@ -l log/$(*F).synth
$(SYNTH) -q -E $@.d -b json -o $@ -l log/$(*F).synth \
-p "read_verilog -sv $<" \
-p "hierarchy $(addprefix -libdir ,$(LIBDIRS) $(<D))" \
-p "synth_ice40 -top $(*F)"
define run-jsontov =
( grep timescale $*.v; $(SYNTH) -q -p "write_verilog -defparam -noattr" -f json $< ) > $@