Add LaTeX rules to makefile

This commit is contained in:
Simon Bruder 2020-10-11 17:28:51 +02:00
parent 9cb72fd4f8
commit eaf2f04e42
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F

View file

@ -1,10 +1,27 @@
default: HANDOUTS = $(patsubst %.odt,%.pdf,$(wildcard revealjs/*/handout.odt))
REVEALJS = $(patsubst %.md,%.html,$(wildcard revealjs/*/index.md))
LATEX = $(patsubst %.tex,%.pdf,$(wildcard latex/*/index.tex))
all: ${HANDOUTS} ${REVEALJS} ${LATEX}
.PHONY: clean .PHONY: clean
clean: clean:
rm -f \ rm -f \
*/*/handout.pdf \ */*/handout.pdf \
latex/*/index.aux \
latex/*/index.bbl \
latex/*/index.bcf \
latex/*/index.blg \
latex/*/index.fdb_latexmk \
latex/*/index.fls \
latex/*/index.log \
latex/*/index.nav \
latex/*/index.out \
latex/*/index.pdf \ latex/*/index.pdf \
latex/*/index.run.xml \
latex/*/index.snm \
latex/*/index.toc \
latex/*/index.xdv \
revealjs/*/index.html \ revealjs/*/index.html \
revealjs/*/index.pdf revealjs/*/index.pdf
@ -13,3 +30,6 @@ revealjs/%/index.html: revealjs/%/*.md
%/handout.pdf: %/handout.odt %/handout.pdf: %/handout.odt
libreoffice --headless --convert-to pdf "$<" --outdir $(@D) libreoffice --headless --convert-to pdf "$<" --outdir $(@D)
latex/%/index.pdf: latex/%/index.tex
latexmk -cd -xelatex $<