aboutsummaryrefslogtreecommitdiff
path: root/build/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'build/Makefile')
-rw-r--r--build/Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/build/Makefile b/build/Makefile
index 79643a9..192668c 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -20,15 +20,19 @@ SRCDIR := ../src
priv: priv-isa-asciidoc.pdf
priv-isa-asciidoc.pdf: $(SRCDIR)/riscv-privileged.adoc
- @echo "Building Privilege ISA"
- asciidoctor-pdf $(ASCIIDOCTOR_OPTS) --out-file=$@ $<
+ @echo "Building Privileged ISA"
+ rm -f $@.tmp
+ asciidoctor-pdf $(ASCIIDOCTOR_OPTS) --out-file=$@.tmp $<
+ mv $@.tmp $@
# Unprivileged ISA
unpriv: unpriv-isa-asciidoc.pdf
unpriv-isa-asciidoc.pdf: $(SRCDIR)/riscv-isa-unpr-conv-review.adoc
- @echo "Building Unprivilege ISA"
- asciidoctor-pdf $(ASCIIDOCTOR_OPTS) --out-file=$@ $<
+ @echo "Building Unprivileged ISA"
+ rm -f $@.tmp
+ asciidoctor-pdf $(ASCIIDOCTOR_OPTS) --out-file=$@.tmp $<
+ mv $@.tmp $@
clean:
@if [ -f priv-isa-asciidoc.pdf ]; then \