DOCUMENT=formula-book.pdf PDFLATEX = pdflatex figures = $(wildcard *.fig) epsfigs = $(figures:.fig=.eps) pdffigs = $(figures:.fig=.pdf) all: $(DOCUMENT) $(DOCUMENT): $(pdffigs) %.pdf: %.tex @echo @echo \* @echo \* Compiling $< @echo \* $(PDFLATEX) $< @while ( grep "Rerun to get cross-references" \ $(subst .tex,.log,$<) >/dev/null ); do \ echo '** Re-running LaTeX **'; \ $(PDFLATEX) $<; \ done %.pdf: %.eps @echo @echo \* @echo \* Producing PDF for $< @echo \* epstopdf $< # %.eps: %.fig # @echo # @echo \* # @echo \* Producing $@ from $< # @echo \* # fig2dev -L eps $< $@ %.eps: %.fig @echo @echo \* @echo \* Producing $@ from $< @echo \* figfrag $< clean: rm -f *.log *.ps *.toc *.aux *.ps *.eps $(pdffigs) *.dvi *.out *~ *.zip *.pic zip: clean zip -9 formula-book.zip * -x old/ -x RCS/