DOCUMENTS:=exam PDFLATEXFLAGS:=-halt-on-error PDFLATEX:=pdflatex $(PDFLATEXFLAGS) all: $(addsuffix .pdf,$(DOCUMENTS)) %.pdf: %.tex q1.tex q2.tex q3.tex $(PDFLATEX) $< $(PDFLATEX) $< clean: $(RM) -v $(addprefix $(DOCUMENTS),.pdf .log .aux)