Add automatic handout compilation to Makefile
This commit is contained in:
9
Makefile
9
Makefile
@@ -1,12 +1,17 @@
|
||||
PDFs := $(patsubst src/%/presentation.tex,build/presentation_%.pdf,$(wildcard src/*/presentation.tex))
|
||||
PRESENTATIONS := $(patsubst src/%/presentation.tex,build/presentation_%.pdf,$(wildcard src/*/presentation.tex))
|
||||
HANDOUTS := $(patsubst build/presentation_%.pdf,build/presentation_%_handout.pdf,$(PRESENTATIONS))
|
||||
|
||||
.PHONY: all
|
||||
all: $(PDFs)
|
||||
all: $(PRESENTATIONS) $(HANDOUTS)
|
||||
|
||||
build/presentation_%.pdf: src/%/presentation.tex build/prepared
|
||||
TEXINPUTS=./lib/cel-slides-template-2025:$$TEXINPUTS latexmk $<
|
||||
mv build/presentation.pdf $@
|
||||
|
||||
build/presentation_%_handout.pdf: src/%/presentation.tex build/prepared
|
||||
TEXINPUTS=./lib/cel-slides-template-2025:$$TEXINPUTS latexmk -pdflatex='pdflatex %O "\def\ishandout{1}\input{%S}"' $<
|
||||
mv build/presentation.pdf $@
|
||||
|
||||
build/prepared:
|
||||
mkdir -p build
|
||||
touch build/prepared
|
||||
|
||||
Reference in New Issue
Block a user