diff options
author | Ioan-Cristian CÎRSTEA <ioan-cristian.cirstea@tutanota.com> | 2024-05-12 14:20:56 +0300 |
---|---|---|
committer | Ioan-Cristian CÎRSTEA <ioan-cristian.cirstea@tutanota.com> | 2024-05-12 19:03:54 +0300 |
commit | 530b428d5eaeca98864db26ce5c2a139a255b062 (patch) | |
tree | 9190b37b36bc1f7e2bd344d381ceda8d016788e7 /build | |
parent | acf7bbd20d6974927bab5a2e6694b1376a210a00 (diff) | |
download | riscv-isa-manual-530b428d5eaeca98864db26ce5c2a139a255b062.zip riscv-isa-manual-530b428d5eaeca98864db26ce5c2a139a255b062.tar.gz riscv-isa-manual-530b428d5eaeca98864db26ce5c2a139a255b062.tar.bz2 |
Added support for EPUB3
This pull requests adds support for building EPUB3 versions of the
RISC-V ISA manuals. To achieve this, `asciidoctor-epub3` extension has
been used.
Known issues: some eBook readers are not capable of rendering embedded
images. The solution to this problem is disabling embedded image
altogether. The `README.md` file provides more details on how to achieve
this.
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan-cristian.cirstea@tutanota.com>
Diffstat (limited to 'build')
-rw-r--r-- | build/.gitignore | 1 | ||||
-rw-r--r-- | build/Makefile | 27 |
2 files changed, 24 insertions, 4 deletions
diff --git a/build/.gitignore b/build/.gitignore index 3c56997..cbc2485 100644 --- a/build/.gitignore +++ b/build/.gitignore @@ -1,6 +1,7 @@ *.aux *.bbl *.blg +*.epub *.html *.log *.out diff --git a/build/Makefile b/build/Makefile index 040ee69..c4d93a7 100644 --- a/build/Makefile +++ b/build/Makefile @@ -14,7 +14,7 @@ # for generating documentation in various formats (PDF, HTML). # Build Targets -TARGETS := priv unpriv priv-html unpriv-html +TARGETS := priv-pdf unpriv-pdf priv-html unpriv-html priv-epub unpriv-epub # Declare phony targets .PHONY: all $(TARGETS) clean @@ -43,7 +43,7 @@ SRCDIR := ../src JUNK := *.pdf *.aux *.log *.bbl *.blg *.toc *.out *.fdb_latexmk *.fls *.synctex.gz # Privileged ISA build -priv: priv-isa-asciidoc.pdf +priv-pdf: priv-isa-asciidoc.pdf priv-isa-asciidoc.pdf: $(SRCDIR)/riscv-privileged.adoc $(SRCDIR)/*.adoc @echo "Building Privileged ISA" @@ -52,7 +52,7 @@ priv-isa-asciidoc.pdf: $(SRCDIR)/riscv-privileged.adoc $(SRCDIR)/*.adoc mv $@.tmp $@ # Unprivileged ISA build -unpriv: unpriv-isa-asciidoc.pdf +unpriv-pdf: unpriv-isa-asciidoc.pdf unpriv-isa-asciidoc.pdf: $(SRCDIR)/riscv-unprivileged.adoc $(SRCDIR)/*.adoc @echo "Building Unprivileged ISA" @@ -74,6 +74,18 @@ unpriv-isa-asciidoc.html: $(SRCDIR)/riscv-unprivileged.adoc @echo "Building Unprivileged ISA HTML" asciidoctor $(ASCIIDOCTOR_OPTS) --out-file=$@ $< +priv-epub: priv-isa-asciidoc.epub + +priv-isa-asciidoc.epub: $(SRCDIR)/riscv-privileged.adoc + @echo "Building Privileged ISA EPUB" + asciidoctor-epub3 $(ASCIIDOCTOR_OPTS) --out-file=$@ $< + +unpriv-epub: unpriv-isa-asciidoc.epub + +unpriv-isa-asciidoc.epub: $(SRCDIR)/riscv-unprivileged.adoc + @echo "Building Unprivileged ISA EPUB" + asciidoctor-epub3 $(ASCIIDOCTOR_OPTS) --out-file=$@ $< + clean: @if [ -f priv-isa-asciidoc.pdf ]; then \ echo "Removing priv-isa-asciidoc.pdf"; \ @@ -91,4 +103,11 @@ clean: echo "Removing unpriv-isa-asciidoc.html"; \ rm -f unpriv-isa-asciidoc.html; \ fi - + @if [ -f priv-isa-asciidoc.epub ]; then \ + echo "Removing priv-isa-asciidoc.epub"; \ + rm -f priv-isa-asciidoc.epub; \ + fi + @if [ -f unpriv-isa-asciidoc.epub ]; then \ + echo "Removing unpriv-isa-asciidoc.epub"; \ + rm -f unpriv-isa-asciidoc.epub; \ + fi |