[37e9c1d] | 1 | # Configuration variables |
---|
| 2 | |
---|
[1eec0b0] | 3 | Build = build |
---|
| 4 | Figures = figures |
---|
| 5 | Pictures = pictures |
---|
[37e9c1d] | 6 | |
---|
[ac4476d] | 7 | LaTMac = ../../LaTeXmacros |
---|
| 8 | BibRep = ../../bibliography |
---|
| 9 | |
---|
[1eec0b0] | 10 | TeXSRC = ${wildcard *.tex} |
---|
| 11 | FigSRC = ${notdir ${wildcard ${Figures}/*.fig}} |
---|
| 12 | PicSRC = ${notdir ${wildcard ${Pictures}/*.fig}} |
---|
[37e9c1d] | 13 | BibSRC = ${wildcard *.bib} |
---|
| 14 | |
---|
[ac4476d] | 15 | TeXLIB = .:${LaTMac}:${Build}: |
---|
| 16 | BibLIB = .:${BibRep}: |
---|
[659fb73] | 17 | |
---|
| 18 | MAKEFLAGS = --no-print-directory # --silent |
---|
[1eec0b0] | 19 | VPATH = ${Build} ${Figures} ${Pictures} # extra search path for file names used in document |
---|
[ab5498ec] | 20 | |
---|
[37e9c1d] | 21 | DOCUMENT = uw-ethesis.pdf |
---|
| 22 | BASE = ${basename ${DOCUMENT}} # remove suffix |
---|
[ab5498ec] | 23 | |
---|
[37e9c1d] | 24 | # Commands |
---|
[1eec0b0] | 25 | |
---|
| 26 | LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build} |
---|
[37e9c1d] | 27 | BibTeX = BIBINPUTS=${BibLIB} && export BIBINPUTS && bibtex |
---|
[1eec0b0] | 28 | #Glossary = INDEXSTYLE=${Build} makeglossaries-lite |
---|
[ab5498ec] | 29 | |
---|
[37e9c1d] | 30 | # Rules and Recipes |
---|
[ab5498ec] | 31 | |
---|
[37e9c1d] | 32 | .PHONY : all clean # not file names |
---|
| 33 | .PRECIOUS: %.dvi %.ps # do not delete intermediate files |
---|
| 34 | .ONESHELL : |
---|
[1eec0b0] | 35 | |
---|
[37e9c1d] | 36 | all : ${DOCUMENT} |
---|
[ab5498ec] | 37 | |
---|
[37e9c1d] | 38 | clean : |
---|
| 39 | @rm -frv ${DOCUMENT} ${Build} |
---|
[1eec0b0] | 40 | |
---|
[37e9c1d] | 41 | # File Dependencies |
---|
[1eec0b0] | 42 | |
---|
[ac4476d] | 43 | %.dvi : ${TeXSRC} ${FigSRC:%.fig=%.tex} ${PicSRC:%.fig=%.pstex} ${BibSRC} ${BibRep}/pl.bib ${LaTMac}/common.tex Makefile | ${Build} |
---|
[1eec0b0] | 44 | ${LaTeX} ${BASE} |
---|
| 45 | ${BibTeX} ${Build}/${BASE} |
---|
| 46 | ${LaTeX} ${BASE} |
---|
[37e9c1d] | 47 | # if needed, run latex again to get citations |
---|
[1eec0b0] | 48 | if fgrep -s "LaTeX Warning: Citation" ${basename $@}.log ; then ${LaTeX} ${BASE} ; fi |
---|
| 49 | # ${Glossary} ${Build}/${BASE} |
---|
| 50 | # ${LaTeX} ${BASE} |
---|
[ab5498ec] | 51 | |
---|
[1eec0b0] | 52 | ${Build}: |
---|
[37e9c1d] | 53 | mkdir -p $@ |
---|
[ab5498ec] | 54 | |
---|
[1eec0b0] | 55 | %.pdf : ${Build}/%.ps | ${Build} |
---|
[659fb73] | 56 | ps2pdf $< |
---|
| 57 | |
---|
[1eec0b0] | 58 | %.ps : %.dvi | ${Build} |
---|
[659fb73] | 59 | dvips $< -o $@ |
---|
[ab5498ec] | 60 | |
---|
[1eec0b0] | 61 | %.tex : %.fig | ${Build} |
---|
| 62 | fig2dev -L eepic $< > ${Build}/$@ |
---|
[659fb73] | 63 | |
---|
[1eec0b0] | 64 | %.ps : %.fig | ${Build} |
---|
| 65 | fig2dev -L ps $< > ${Build}/$@ |
---|
[659fb73] | 66 | |
---|
[1eec0b0] | 67 | %.pstex : %.fig | ${Build} |
---|
| 68 | fig2dev -L pstex $< > ${Build}/$@ |
---|
| 69 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t |
---|