source: doc/theses/jiada_liang_MMath/Makefile @ 18ebc28

Last change on this file since 18ebc28 was 18ebc28, checked in by Peter A. Buhr <pabuhr@…>, 15 months ago

create MMath thesis macros for Jiada

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