#!/usr/bin/make all: $(patsubst %.tex,%.pdf,$(wildcard *.tex)) pdf: all %.pdf: %.tex latexmk -f -pdf -quiet $< clean: latexmk -f -pdf -quiet -c *.tex rm -rf figure/ rm -f *.tmp rm -f vc rm -f *.bbl rm -f *.pdf viewpdf: all evince *.pdf spell: aspell -c -t --tex-check-comments -b text.tex .PHONY: clean all .PRECIOUS: %.tex