wt-tut-presentations/Makefile

22 lines
731 B
Makefile

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: $(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
.PHONY: clean
clean:
rm -rf build