DOC = uw-ethesis.pdf BASE = ${DOC:%.pdf=%} # remove suffix # directory for latex clutter files BUILD = build TEXSRC = $(wildcard *.tex) FIGSRC = $(wildcard *.fig) BIBSRC = $(wildcard *.bib) TEXLIB = .:../../LaTeXmacros:${BUILD}: # common latex macros BIBLIB = .:../../bibliography # common citation repository MAKEFLAGS = --no-print-directory # --silent VPATH = ${BUILD} ### Special Rules: .PHONY: all clean .PRECIOUS: %.dvi %.ps # do not delete intermediate files ### Commands: LATEX = TEXINPUTS=${TEXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${BUILD} BIBTEX = BIBINPUTS=${BIBLIB} bibtex #GLOSSARY = INDEXSTYLE=${BUILD} makeglossaries-lite ### Rules and Recipes: all: ${DOC} ${BUILD}/%.dvi: ${TEXSRC} ${FIGSRC:%.fig=%.tex} ${BIBSRC} Makefile | ${BUILD} ${LATEX} ${BASE} ${BIBTEX} ${BUILD}/${BASE} ${LATEX} ${BASE} # ${GLOSSARY} ${BUILD}/${BASE} # ${LATEX} ${BASE} ${BUILD}: mkdir $@ %.pdf : ${BUILD}/%.ps | ${BUILD} ps2pdf $< %.ps : %.dvi | ${BUILD} dvips $< -o $@ %.tex : %.fig | ${BUILD} fig2dev -L eepic $< > ${BUILD}/$@ %.ps : %.fig | ${BUILD} fig2dev -L ps $< > ${BUILD}/$@ %.pstex : %.fig | ${BUILD} fig2dev -L pstex $< > ${BUILD}/$@ fig2dev -L pstex_t -p ${BUILD}/$@ $< > ${BUILD}/$@_t clean: @rm -frv ${DOC} ${BUILD} *.fig.bak