aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2024-05-29 17:21:21 -0700
committerAndrew Waterman <andrew@sifive.com>2024-05-29 17:21:21 -0700
commit892d3d2df901cfa0ec99d994b67d2fe663c16b20 (patch)
tree9b709122338039e4a5415f51b4e47692fa4405f8 /build
parent2e57a4aa7cd28c9d3c0799c0e0d28dc206965cae (diff)
downloadriscv-isa-manual-892d3d2df901cfa0ec99d994b67d2fe663c16b20.zip
riscv-isa-manual-892d3d2df901cfa0ec99d994b67d2fe663c16b20.tar.gz
riscv-isa-manual-892d3d2df901cfa0ec99d994b67d2fe663c16b20.tar.bz2
Always build into .tmp then move
Diffstat (limited to 'build')
-rw-r--r--build/Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/build/Makefile b/build/Makefile
index f5affe3..7641128 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -68,26 +68,34 @@ priv-html: priv-isa.html
priv-isa.html: $(SRCDIR)/riscv-privileged.adoc
@echo "Building Privileged ISA HTML"
- asciidoctor $(ASCIIDOCTOR_OPTS) --out-file=$@ $<
+ rm -f $@.tmp
+ asciidoctor $(ASCIIDOCTOR_OPTS) --out-file=$@.tmp $<
+ mv $@.tmp $@
# Unprivileged ISA HTML build
unpriv-html: unpriv-isa.html
unpriv-isa.html: $(SRCDIR)/riscv-unprivileged.adoc
@echo "Building Unprivileged ISA HTML"
- asciidoctor $(ASCIIDOCTOR_OPTS) --out-file=$@ $<
+ rm -f $@.tmp
+ asciidoctor $(ASCIIDOCTOR_OPTS) --out-file=$@.tmp $<
+ mv $@.tmp $@
priv-epub: priv-isa.epub
priv-isa.epub: $(SRCDIR)/riscv-privileged.adoc
@echo "Building Privileged ISA EPUB"
- asciidoctor-epub3 $(ASCIIDOCTOR_OPTS) --out-file=$@ $<
+ rm -f $@.tmp
+ asciidoctor-epub3 $(ASCIIDOCTOR_OPTS) --out-file=$@.tmp $<
+ mv $@.tmp $@
unpriv-epub: unpriv-isa.epub
unpriv-isa.epub: $(SRCDIR)/riscv-unprivileged.adoc
@echo "Building Unprivileged ISA EPUB"
- asciidoctor-epub3 $(ASCIIDOCTOR_OPTS) --out-file=$@ $<
+ rm -f $@.tmp
+ asciidoctor-epub3 $(ASCIIDOCTOR_OPTS) --out-file=$@.tmp $<
+ mv $@.tmp $@
clean:
@if [ -f priv-isa.pdf ]; then \