SOURCES = $(wildcard *.tex) OBJECTS = $(patsubst %.tex, %.pdf, $(SOURCES)) all: $(OBJECTS) %.pdf : %.tex xelatex -halt-on-error $< xelatex -halt-on-error $< clean: cleanup rm -f $(OBJECTS) cleanup: rm -f *.log *.aux *.nav *.snm *.toc *.vrb *.out