TEXs = $(wildcard *.tex) PDFs = $(TEXs:%.tex=%.pdf) all: $(PDFs) %.pdf: %.tex latexmk -pdf $< clean: rm -f texs $(PDFs) realclean: clean rm -f $(TEXs) .PHONY: clean all