all: KlausurLV_SS14_September.pdf KlausurLV_WS1415_Maerz.pdf

continuous: $(PDF).continuous

clean: cleanup rmpdf

rmpdf:
	@-rm -f *.pdf

cleanup:
	@-rm -f *.aux *.fdb_latexmk *.fls *.log *.out

%.continuous: %.pdf
	@latexmk -quiet -jobname=$(@:%.continuous=%) -pvc -pdf $(@:%.continuous=%).tex

%.pdf: %.tex
	@latexmk -quiet -jobname=$(@:%.pdf=%) -pdf -halt-on-error $<

.PHONY: all continuous cleanup single clean rmpdf
