Make Makefile completely generic

This commit is contained in:
Andreas Tsouchlos 2025-10-25 23:19:40 +02:00
parent eb077ca793
commit 1c042a7626

View File

@ -1,19 +1,16 @@
PDFs := $(patsubst src/%/presentation.tex,build/presentation_%.pdf,$(wildcard src/*/presentation.tex))
.PHONY: all
all: build/prepared build/presentation_template.pdf build/presentation_2025-11-07.pdf
all: $(PDFs)
build/presentation_template.pdf:
TEXINPUTS=./lib/cel-slides-template-2025:$$TEXINPUTS latexmk src/template/presentation.tex
mv build/presentation.pdf $@
build/presentation_2025-11-07.pdf:
TEXINPUTS=./lib/cel-slides-template-2025:$$TEXINPUTS latexmk src/2025-11-07/presentation.tex
build/presentation_%.pdf: src/%/presentation.tex build/prepared
TEXINPUTS=./lib/cel-slides-template-2025:$$TEXINPUTS latexmk $<
mv build/presentation.pdf $@
build/prepared:
mkdir -p build build
mkdir -p build
touch build/prepared
.PHONY: clean
clean:
rm -rf build