1 | ## Define the appropriate configuration variables.
|
---|
2 |
|
---|
3 | TeXLIB = .:../../LaTeXmacros:../../LaTeXmacros/listings:../../LaTeXmacros/enumitem:~/bibliographies:
|
---|
4 | LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error
|
---|
5 | BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
|
---|
6 |
|
---|
7 | ## Define the text source files.
|
---|
8 |
|
---|
9 | SOURCES = ${addsuffix .tex, \
|
---|
10 | thesis \
|
---|
11 | style \
|
---|
12 | cfa-format \
|
---|
13 | glossary \
|
---|
14 | }
|
---|
15 |
|
---|
16 | FIGURES = ${addsuffix .tex, \
|
---|
17 | monitor \
|
---|
18 | ext_monitor \
|
---|
19 | }
|
---|
20 |
|
---|
21 | PICTURES = ${addsuffix .pstex, \
|
---|
22 | }
|
---|
23 |
|
---|
24 | PROGRAMS = ${addsuffix .tex, \
|
---|
25 | }
|
---|
26 |
|
---|
27 | GRAPHS = ${addsuffix .tex, \
|
---|
28 | }
|
---|
29 |
|
---|
30 | ## Define the documents that need to be made.
|
---|
31 |
|
---|
32 | DOCUMENT = thesis.pdf
|
---|
33 |
|
---|
34 | # Directives #
|
---|
35 |
|
---|
36 | all : ${DOCUMENT}
|
---|
37 |
|
---|
38 | clean :
|
---|
39 | rm -f *.bbl *.aux *.dvi *.idx *.ilg *.ind *.brf *.out *.log *.toc *.blg *.pstex_t *.cf *.glg *.glo *.gls *.ist *.acn *.acr *.alg \
|
---|
40 | ${FIGURES} ${PICTURES} ${PROGRAMS} ${GRAPHS} ${basename ${DOCUMENT}}.ps ${DOCUMENT}
|
---|
41 |
|
---|
42 | # File Dependencies #
|
---|
43 |
|
---|
44 | ${DOCUMENT} : build/${basename ${DOCUMENT}}.ps
|
---|
45 | ps2pdf $<
|
---|
46 |
|
---|
47 | build/${basename ${DOCUMENT}}.ps : ${basename ${DOCUMENT}}.dvi
|
---|
48 | dvips $< -o $@
|
---|
49 |
|
---|
50 | build/${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex \
|
---|
51 | ../../LaTeXmacros/common.tex ../../LaTeXmacros/indexstyle
|
---|
52 | # Conditionally create the build folder
|
---|
53 | if [ ! -r build ] ; then mkdir build ; fi
|
---|
54 | # # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
|
---|
55 | # if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi
|
---|
56 | # # Must have *.aux file containing citations for bibtex
|
---|
57 | # if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
|
---|
58 | # -${BibTeX} ${basename $@}
|
---|
59 | # # Some citations reference others so run steps again to resolve these citations
|
---|
60 | # ${LaTeX} ${basename $@}.tex
|
---|
61 | # -${BibTeX} ${basename $@}
|
---|
62 | # # Make index from *.aux entries and input index at end of document
|
---|
63 | # makeglossaries ${basename $@}
|
---|
64 | # #${LaTeX} ${basename $@}.tex
|
---|
65 | # # Run again to get index title into table of contents
|
---|
66 | # ${LaTeX} ${basename $@}.tex
|
---|
67 | # -./bump_ver.sh
|
---|
68 | # ${LaTeX} ${basename $@}.tex
|
---|
69 |
|
---|
70 |
|
---|
71 | predefined :
|
---|
72 | sed -f predefined.sed ${basename ${DOCUMENT}}.tex > ${basename $@}.cf
|
---|
73 |
|
---|
74 | ## Define the default recipes.
|
---|
75 |
|
---|
76 | build/%.tex : %.fig
|
---|
77 | fig2dev -L eepic $< > $@
|
---|
78 |
|
---|
79 | build/%.ps : %.fig
|
---|
80 | fig2dev -L ps $< > $@
|
---|
81 |
|
---|
82 | build/%.pstex : %.fig
|
---|
83 | fig2dev -L pstex $< > $@
|
---|
84 | fig2dev -L pstex_t -p $@ $< > $@_t
|
---|
85 |
|
---|
86 |
|
---|
87 | # Local Variables: #
|
---|
88 | # compile-command: "make" #
|
---|
89 | # End: #
|
---|