NOTE = !! change the next line to fit your filename; no spaces at file name end !! FILE = Thesis all: all-graphviz pdflatex $(FILE) dot -Tpdf -o abc.pdf abc.dot bibtex $(FILE) makeindex Thesis.nlo -s nomencl.ist -o Thesis.nls pdflatex $(FILE) pdflatex $(FILE) clean: rm -f *.dvi *.log *.aux *.bbl *.blg *.toc *.lof *.lot *.cb *.~ *.ilg *.nlo *.nls *.out *.glo graphviz/*.png graphiz/*.pdf all-graphviz: #for dot in graphviz/*.dot; do make $${dot%%.dot}.png; done for dot in graphviz/*.dot; do make $${dot%%.dot}.pdf; done graphviz/%.png: graphviz/%.dot dot -Tpng < $< > $@ graphviz/%.pdf: graphviz/%.dot dot -Tpdf < $< > $@