talks/Makefile.common

27 lines
579 B
Makefile

.PHONY: all
PATCHES := $(wildcard *.patch)
SOURCES := build/$(SOURCE) $(patsubst %.patch,build/%.tex,$(PATCHES))
DOCUMENTS := \
$(patsubst build/%.tex,build/%.pdf,$(SOURCES)) \
$(patsubst build/%.tex,build/%__notes.pdf,$(SOURCES))
all: $(DOCUMENTS)
mkdir -p ../documents && mv $^ ../documents
build:
mkdir build
build/%.tex: %.patch build
cp $(SOURCE) $@
patch $@ $<
build/%.tex: %.tex build
cp $< $@
build/%__notes.tex: build/%.tex
cat $< | sed -e 's/{hide notes}/{show notes on second screen}/' > $@
build/%.pdf: build/%.tex
pdflatex -output-directory build $<