diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index 7f2987b6..fdca31f6 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -18,7 +18,8 @@ jobs: - name: Install Prerequisites run: | sudo apt update - sudo apt install python3-pil asciidoc unzip zip ruby dos2unix + sudo apt install python3-pil asciidoc unzip zip ruby dos2unix \ + inkscape sudo gem install asciidoctor-pdf --pre - name: Install Deutex run: | @@ -43,6 +44,10 @@ jobs: export VERSION=${VERSION:1} fi echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + - name: Make manual cover PDFs + run: | + cd manual + make covers - name: Upload Freedoom uses: actions/upload-artifact@v4 with: diff --git a/manual/Makefile b/manual/Makefile index f840145f..b8e6eab0 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -11,9 +11,16 @@ ASCIIDOCTOR_FLAGS = -a pdf-page-size=A5 MANUAL_ADOC_FILES=$(wildcard freedoom-manual-??.adoc) MANUAL_PDF_FILES=$(subst .adoc,.pdf,$(MANUAL_ADOC_FILES)) +COVER_PDF_FILES=cover.pdf all: $(MANUAL_PDF_FILES) +# We only build the cover PDFs if the user explicitly runs `make covers`; +# this is because it requires Inkscape and we don't want it as a build +# dependency. Most users won't ever need these, we only use them when we're +# uploading the PDF files to print physical manuals. +covers: $(COVER_PDF_FILES) + freedoom-manual-%.pdf: freedoom-manual-%.adoc -asciidoctor-pdf $(ASCIIDOCTOR_FLAGS) $< -o $@ @@ -21,4 +28,4 @@ cover.pdf: cover/cover.svg cover/serpentipede.png cover/minigunner.png inkscape -o $@ $< clean: - $(RM) $(MANUAL_PDF_FILES) + $(RM) $(MANUAL_PDF_FILES) $(COVER_PDF_FILES)