+stage1-riscv-fesvr/riscv-fesvr-$(RISCV_FESVR_SHORTCOMMIT).tar.gz:
+ rm -f $@ $@-t
+ wget -O $@-t 'https://github.com/riscv/riscv-fesvr/archive/$(RISCV_FESVR_COMMIT)/riscv-fesvr-$(RISCV_FESVR_SHORTCOMMIT).tar.gz'
+ mv $@-t $@
+
+stage1-riscv-fesvr/riscv-fesvr.spec: stage1-riscv-fesvr/riscv-fesvr.spec.in
+ sed -e 's/@COMMIT@/$(RISCV_FESVR_COMMIT)/g' \
+ -e 's/@SHORTCOMMIT@/$(RISCV_FESVR_SHORTCOMMIT)/g' \
+ < $^ > $@-t
+ mv $@-t $@
+
+stamp-riscv-fesvr-installed:
+ rm -f $@
+ @rpm -q riscv-fesvr >/dev/null || { \
+ echo "ERROR: You must install riscv-fesvr:"; \
+ echo; \
+ echo " dnf copr enable rjones/riscv"; \
+ echo " dnf install riscv-fesvr"; \
+ echo; \
+ echo "OR: you can build it yourself from the stage1-riscv-fesvr directory."; \
+ echo; \
+ exit 1; \
+ }
+ touch $@
+
+stage1-riscv-isa-sim/riscv-isa-sim-$(RISCV_ISA_SIM_SHORTCOMMIT).tar.gz:
+ rm -f $@ $@-t
+ wget -O $@-t 'https://github.com/riscv/riscv-isa-sim/archive/$(RISCV_ISA_SIM_COMMIT)/riscv-isa-sim-$(RISCV_ISA_SIM_SHORTCOMMIT).tar.gz'
+ mv $@-t $@
+
+stage1-riscv-isa-sim/riscv-isa-sim.spec: stage1-riscv-isa-sim/riscv-isa-sim.spec.in
+ sed -e 's/@COMMIT@/$(RISCV_ISA_SIM_COMMIT)/g' \
+ -e 's/@SHORTCOMMIT@/$(RISCV_ISA_SIM_SHORTCOMMIT)/g' \
+ < $^ > $@-t
+ mv $@-t $@
+
+stamp-riscv-isa-sim-installed:
+ rm -f $@
+ @rpm -q riscv-isa-sim >/dev/null || { \
+ echo "ERROR: You must install riscv-isa-sim:"; \
+ echo; \
+ echo " dnf copr enable rjones/riscv"; \
+ echo " dnf install riscv-isa-sim"; \
+ echo; \
+ echo "OR: you can build it yourself from the stage1-riscv-isa-sim directory."; \
+ echo; \
+ exit 1; \
+ }
+ touch $@
+