all: klausur_idb_WS1516.pdf 

continuous: $(PDF).continuous

clean: cleanup all

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

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

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

.PHONY: all continuous cleanup single clean
