slidenado/Makefile

24 lines
575 B
Makefile
Raw Normal View History

2018-08-19 15:23:40 +02:00
PRESENTATIONS=$(patsubst %.tex, %.pdf, $(wildcard presentations/*.tex))
BUILD_DIR=build
BUILD_DECKS=$(subst presentations, presentations/$(BUILD_DIR), $(wildcard presentations/content/*))
LATEX=pdflatex -output-directory $(BUILD_DIR)
2018-08-19 15:23:40 +02:00
all: ${PRESENTATIONS}
2018-08-19 15:40:27 +02:00
clean:
rm -fr presentations/$(BUILD_DIR)
distclean: clean
rm -f presentations/*.pdf
.SECONDARY: $(BUILD_DECKS)
presentations/$(BUILD_DIR)/%:
mkdir -p $@
2018-08-19 15:40:27 +02:00
2018-08-08 20:25:42 +02:00
.ONESHELL:
presentations/%.pdf : presentations/%.tex $(BUILD_DECKS)
2018-08-08 20:25:42 +02:00
cd presentations
$(LATEX) $(notdir $<)
$(LATEX) $(notdir $<)
mv $(BUILD_DIR)/$*.pdf .