diff --git a/Makefile b/Makefile index 3df8b68..d7d0d41 100644 --- a/Makefile +++ b/Makefile @@ -20,10 +20,8 @@ riscvintl/riscv-docs-base-container-image:latest SRC_DIR := src BUILD_DIR := build -HEADER_SOURCE := $(SRC_DIR)/header.adoc -PDF_RESULT := $(BUILD_DIR)/spec-sample.pdf -HTML_RESULT := $(BUILD_DIR)/spec-sample.html - +HEADER_SOURCE := $(SRC_DIR)/spec-sample.adoc +XTRA_ADOC_OPTS := ASCIIDOCTOR_PDF := asciidoctor-pdf ASCIIDOCTOR_HTML := asciidoctor OPTIONS := --trace \ @@ -34,6 +32,8 @@ OPTIONS := --trace \ -a revdate=${DATE} \ -a pdf-fontsdir=docs-resources/fonts \ -a pdf-theme=docs-resources/themes/riscv-pdf.yml \ + $(XTRA_ADOC_OPTS) \ + -D build \ --failure-level=ERROR REQUIRES := --require=asciidoctor-bibtex \ --require=asciidoctor-diagram \ @@ -55,14 +55,14 @@ build: build-container: @echo "Starting build inside Docker container..." - $(DOCKER_RUN) /bin/sh -c "$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$(PDF_RESULT) $(HEADER_SOURCE)" - $(DOCKER_RUN) /bin/sh -c "$(ASCIIDOCTOR_HTML) $(OPTIONS) $(REQUIRES) --out-file=$(HTML_RESULT) $(HEADER_SOURCE)" + $(DOCKER_RUN) /bin/sh -c "$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) $(HEADER_SOURCE)" + $(DOCKER_RUN) /bin/sh -c "$(ASCIIDOCTOR_HTML) $(OPTIONS) $(REQUIRES) $(HEADER_SOURCE)" @echo "Build completed successfully inside Docker container." build-no-container: @echo "Starting build..." - $(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$(PDF_RESULT) $(HEADER_SOURCE) - $(ASCIIDOCTOR_HTML) $(OPTIONS) $(REQUIRES) --out-file=$(HTML_RESULT) $(HEADER_SOURCE) + $(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) $(HEADER_SOURCE) + $(ASCIIDOCTOR_HTML) $(OPTIONS) $(REQUIRES) $(HEADER_SOURCE) @echo "Build completed successfully." clean: diff --git a/src/header.adoc b/src/spec-sample.adoc similarity index 100% rename from src/header.adoc rename to src/spec-sample.adoc