TEX=rubber -d TEXs=$(wildcard *.tex) PDFs=$(TEXs:.tex=.pdf) default: $(PDFs) clean: rm -f *.blg *.log *.out *.aux *.toc *.bbl *.mtc* *.maf *.lof *.lot *.som *.pdf sections/*.aux keeppdf: rm -f *.blg *.log *.out *.aux *.toc *.bbl *.mtc* *.maf *.lof *.lot *.som sections/*.aux %.pdf: %.tex $(TEX) $<