diff options
author | Andrew Waterman <andrew@sifive.com> | 2023-03-28 13:01:15 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2023-03-28 13:01:15 -0700 |
commit | e4aff82df4aa2ce9e1c15080372a9f7ceb2fdfa5 (patch) | |
tree | b93feb65ca27875edb944e5c4fac8cefa5fbc72f /build/Makefile | |
parent | 2024b34a5243bf63f79fb405d897fa80a1c86773 (diff) | |
download | riscv-isa-manual-e4aff82df4aa2ce9e1c15080372a9f7ceb2fdfa5.zip riscv-isa-manual-e4aff82df4aa2ce9e1c15080372a9f7ceb2fdfa5.tar.gz riscv-isa-manual-e4aff82df4aa2ce9e1c15080372a9f7ceb2fdfa5.tar.bz2 |
Don't generate .pdf output unless build succeeds
Diffstat (limited to 'build/Makefile')
-rw-r--r-- | build/Makefile | 12 |
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 \ |