Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix copyright and theme and template #79

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs-resources"]
path = docs-resources
url = https://github.com/riscv/docs-resources.git
69 changes: 51 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,61 @@
all: zjid-spec.pdf zjpm-spec.pdf
DOCKER_RUN := docker run --rm -v ${PWD}:/build -w /build \
riscvintl/riscv-docs-base-container-image:latest

zjid-spec.pdf: zjid/*.adoc docs-templates
mkdir -p zjid/images
cp docs-templates/src/images/risc-v_logo.png zjid/images
cp docs-templates/src/images/backpage.png zjid/images
asciidoctor-pdf \
HEADER_SOURCE := zjpm/header.adoc
PDF_RESULT := zjpm-spec.pdf

ASCIIDOCTOR_PDF := asciidoctor-pdf
OPTIONS := --trace \
-a compress \
-a mathematical-format=svg \
-a pdf-fontsdir=docs-resources/fonts \
-a pdf-theme=docs-resources/themes/riscv-pdf.yml \
--failure-level=ERROR
REQUIRES := --require=asciidoctor-diagram

.PHONY: all build clean build-container build-no-container

all: build

#zjid-spec.pdf: zjid/*.adoc
# asciidoctor-pdf \
--attribute=mathematical-format=svg \
--attribute=pdf-fontsdir=docs-templates/resources/fonts \
--attribute=pdf-style=docs-templates/resources/themes/riscv-pdf.yml \
--attribute=pdf-fontsdir=docs-resources/fonts \
--attribute=pdf-theme=docs-resources/themes/riscv-pdf.yml \
--failure-level=ERROR \
--out-file=$@ \
zjid/header.adoc

zjpm-spec.pdf: zjpm/*.adoc docs-templates
mkdir -p zjpm/images
cp docs-templates/src/images/risc-v_logo.png zjpm/images
cp docs-templates/src/images/backpage.png zjpm/images
asciidoctor-pdf \
build:
@echo "Checking if Docker is available..."
@if command -v docker >/dev/null 2>&1 ; then \
echo "Docker is available, building inside Docker container..."; \
$(MAKE) build-container; \
else \
echo "Docker is not available, building without Docker..."; \
$(MAKE) build-no-container; \
fi

build-container:
@echo "Starting build inside Docker container..."
$(DOCKER_RUN) /bin/sh -c "$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$(PDF_RESULT) $(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)
@echo "Build completed successfully."

clean:
@echo "Cleaning up generated files..."
rm -f $(PDF_RESULT)
@echo "Cleanup completed."

#zjpm-spec.pdf: zjpm/*.adoc
# asciidoctor-pdf \
--attribute=mathematical-format=svg \
--attribute=pdf-fontsdir=docs-templates/resources/fonts \
--attribute=pdf-style=docs-templates/resources/themes/riscv-pdf.yml \
--attribute=pdf-fontsdir=docs-resources/fonts \
--attribute=pdf-theme=docs-resources/themes/riscv-pdf.yml \
--failure-level=ERROR \
--out-file=$@ \
zjpm/header.adoc

docs-templates:
git clone https://github.com/riscv/docs-templates.git
1 change: 1 addition & 0 deletions docs-resources
Submodule docs-resources added at 35203a
4 changes: 2 additions & 2 deletions zjid/header.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
:preface-title: Preamble
:colophon:
:appendix-caption: Appendix
:imagesdir: images
:imagesdir: ../docs-resources/images
:title-logo-image: image:risc-v_logo.png[pdfwidth=3.25in,align=center]
//:page-background-image: image:draft.svg[opacity=20%]
//:title-page-background-image: none
:back-cover-image: image:backpage.png[opacity=25%]
//:back-cover-image: image:backpage.png[opacity=25%]
// Settings:
:experimental:
:reproducible:
Expand Down
Binary file modified zjpm-spec.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions zjpm/header.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:description: RISC-V J Extension: Pointer Masking
:company: RISC-V.org
:revdate: 05/2024
:revnumber: 1.0.0-rc2
:revnumber: 1.0-rc3
:revremark: Frozen
//development: assume everything can change
//stable: assume everything could change
Expand All @@ -15,11 +15,11 @@
:preface-title: Preamble
:colophon:
:appendix-caption: Appendix
:imagesdir: images
:imagesdir: ../docs-resources/images
:title-logo-image: image:risc-v_logo.png[pdfwidth=3.25in,align=center]
//:page-background-image: image:draft.svg[opacity=20%]
//:title-page-background-image: none
:back-cover-image: image:backpage.png[opacity=25%]
//:back-cover-image: image:backpage.png[opacity=25%]
// Settings:
:experimental:
:reproducible:
Expand Down
Loading