diff --git a/manual/Makefile b/manual/Makefile index ec825ce6..db590b8e 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -11,11 +11,15 @@ ASCIIDOCTOR_FLAGS = -a pdf-page-size=A5 MANUAL_ADOC_FILES=$(wildcard freedoom-manual-??.adoc) MANUAL_PDF_FILES=$(subst .adoc,.pdf,$(MANUAL_ADOC_FILES)) +PRINT_PDF_FILES=$(subst .adoc,-print.pdf,$(MANUAL_ADOC_FILES)) COVER_PDF_FILES=cover-en.pdf cover-es.pdf cover-fr.pdf COVER_SVG_FILES=$(patsubst %.pdf,cover/%.svg,$(COVER_PDF_FILES)) all: $(MANUAL_PDF_FILES) +# `make print` builds all the PDFs for printed versions of the manuals. +print: covers $(PRINT_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 @@ -25,6 +29,9 @@ covers: $(COVER_PDF_FILES) freedoom-manual-%.pdf: freedoom-manual-%.adoc -asciidoctor-pdf $(ASCIIDOCTOR_FLAGS) $< -o $@ +freedoom-manual-%-print.pdf: freedoom-manual-%.adoc + -asciidoctor-pdf $(ASCIIDOCTOR_FLAGS) -a media=print $< -o $@ + cover/cover-%.svg: cover/cover-%.sed cover/template.svg sed -f $< < cover/template.svg > $@ @@ -32,7 +39,8 @@ cover-%.pdf: cover/cover-%.svg cover/serpentipede.png cover/minigunner.png inkscape -o $@ $< clean: - $(RM) $(MANUAL_PDF_FILES) $(COVER_PDF_FILES) $(COVER_SVG_FILES) + $(RM) $(MANUAL_PDF_FILES) $(COVER_PDF_FILES) $(COVER_SVG_FILES) \ + $(PRINT_PDF_FILES) # Inkscape can't process files in parallel, it has to be sequential: .NOTPARALLEL: covers