This repository has been archived on 2022-03-27. You can view files and clone it, but cannot push or open issues/pull-requests.
presis/Makefile

36 lines
882 B
Makefile

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
clean:
rm -f \
*/*/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.run.xml \
latex/*/index.snm \
latex/*/index.toc \
latex/*/index.xdv \
revealjs/*/index.html \
revealjs/*/index.pdf
revealjs/%/index.html: revealjs/%/*.md
python3 revealjs/build.py $@
%/handout.pdf: %/handout.odt
libreoffice --headless --convert-to pdf "$<" --outdir $(@D)
latex/%/index.pdf: latex/%/index.tex
latexmk -cd -xelatex $<