aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/priv.mk22
-rw-r--r--build/unpriv.mk22
2 files changed, 44 insertions, 0 deletions
diff --git a/build/priv.mk b/build/priv.mk
new file mode 100644
index 0000000..f287023
--- /dev/null
+++ b/build/priv.mk
@@ -0,0 +1,22 @@
+HEADER_SOURCE := ../src/riscv-privileged.adoc
+#HEADER_SOURCE := ../src/riscv-isa-unpr-conv-review.adoc
+PDF_RESULT := priv-isa-asciidoc.pdf
+#PDF_RESULT := unpriv-isa-asciidoc.pdf
+# Not all document sources are yet listed here. Not just adoc files but
+# images/ and resources/ content. Once they are the target can remove the
+# phony use.
+SOURCES := $(HEADER_SOURCE)
+
+all: $(PDF_RESULT)
+
+.PHONY: $(PDF_RESULT)
+$(PDF_RESULT): $(SOURCES)
+ asciidoctor-pdf \
+ --attribute=mathematical-format=svg \
+ --failure-level=ERROR \
+ --require=asciidoctor-bibtex \
+ --require=asciidoctor-diagram \
+ --require=asciidoctor-mathematical \
+ --trace \
+ --out-file=$@ \
+ $(HEADER_SOURCE) \ No newline at end of file
diff --git a/build/unpriv.mk b/build/unpriv.mk
new file mode 100644
index 0000000..aa7158d
--- /dev/null
+++ b/build/unpriv.mk
@@ -0,0 +1,22 @@
+#HEADER_SOURCE := ../src/riscv-privileged.adoc
+HEADER_SOURCE := ../src/riscv-isa-unpr-conv-review.adoc
+#PDF_RESULT := priv-isa-asciidoc.pdf
+PDF_RESULT := unpriv-isa-asciidoc.pdf
+# Not all document sources are yet listed here. Not just adoc files but
+# images/ and resources/ content. Once they are the target can remove the
+# phony use.
+SOURCES := $(HEADER_SOURCE)
+
+all: $(PDF_RESULT)
+
+.PHONY: $(PDF_RESULT)
+$(PDF_RESULT): $(SOURCES)
+ asciidoctor-pdf \
+ --attribute=mathematical-format=svg \
+ --failure-level=ERROR \
+ --require=asciidoctor-bibtex \
+ --require=asciidoctor-diagram \
+ --require=asciidoctor-mathematical \
+ --trace \
+ --out-file=$@ \
+ $(HEADER_SOURCE) \ No newline at end of file