[23c27039] | 1 | ## Define the configuration variables.
|
---|
[694ee7d] | 2 |
|
---|
[23c27039] | 3 | Build = build
|
---|
| 4 | Figures = figures
|
---|
| 5 | Macros = ../../LaTeXmacros
|
---|
| 6 | TeXLIB = .:style:text:annex:${Macros}:${Build}:../../bibliography:
|
---|
| 7 | LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
|
---|
[27dde72] | 8 | BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex -terse
|
---|
[694ee7d] | 9 |
|
---|
[23c27039] | 10 | MAKEFLAGS = --no-print-directory --silent #
|
---|
| 11 | VPATH = ${Build} ${Figures}
|
---|
| 12 |
|
---|
[694ee7d] | 13 | ## Define the text source files.
|
---|
| 14 |
|
---|
| 15 | SOURCES = ${addsuffix .tex, \
|
---|
[db0fa7c] | 16 | thesis \
|
---|
[27dde72] | 17 | style/style \
|
---|
| 18 | style/cfa-format \
|
---|
| 19 | annex/glossary \
|
---|
[cf966b5] | 20 | text/frontpgs \
|
---|
[27dde72] | 21 | text/intro \
|
---|
| 22 | text/basics \
|
---|
[64b272a] | 23 | text/cforall \
|
---|
[27dde72] | 24 | text/concurrency \
|
---|
[dcfc4b35] | 25 | text/internals \
|
---|
[27dde72] | 26 | text/parallelism \
|
---|
[64b272a] | 27 | text/results \
|
---|
[d67cdb7] | 28 | text/together \
|
---|
| 29 | text/future \
|
---|
[694ee7d] | 30 | }
|
---|
| 31 |
|
---|
[23c27039] | 32 | FIGURES = ${addsuffix .tex, \
|
---|
| 33 | monitor \
|
---|
| 34 | ext_monitor \
|
---|
| 35 | int_monitor \
|
---|
| 36 | dependency \
|
---|
| 37 | }
|
---|
[694ee7d] | 38 |
|
---|
[23c27039] | 39 | PICTURES = ${addsuffix .pstex, \
|
---|
| 40 | system \
|
---|
| 41 | monitor_structs \
|
---|
| 42 | }
|
---|
[694ee7d] | 43 |
|
---|
| 44 | PROGRAMS = ${addsuffix .tex, \
|
---|
| 45 | }
|
---|
| 46 |
|
---|
| 47 | GRAPHS = ${addsuffix .tex, \
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | ## Define the documents that need to be made.
|
---|
| 51 |
|
---|
[db0fa7c] | 52 | DOCUMENT = thesis.pdf
|
---|
[484ee53] | 53 | BASE = ${basename ${DOCUMENT}}
|
---|
[694ee7d] | 54 |
|
---|
| 55 | # Directives #
|
---|
| 56 |
|
---|
[23c27039] | 57 | .PHONY : all clean # not file names
|
---|
| 58 |
|
---|
[694ee7d] | 59 | all : ${DOCUMENT}
|
---|
| 60 |
|
---|
| 61 | clean :
|
---|
[484ee53] | 62 | @rm -frv ${DOCUMENT} ${BASE}.ps ${Build}
|
---|
[694ee7d] | 63 |
|
---|
| 64 | # File Dependencies #
|
---|
| 65 |
|
---|
[484ee53] | 66 | ${DOCUMENT} : ${BASE}.ps
|
---|
[694ee7d] | 67 | ps2pdf $<
|
---|
| 68 |
|
---|
[484ee53] | 69 | ${BASE}.ps : ${BASE}.dvi
|
---|
[23c27039] | 70 | dvips ${Build}/$< -o $@
|
---|
| 71 |
|
---|
[484ee53] | 72 | ${BASE}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} \
|
---|
| 73 | ${Macros}/common.tex ${Macros}/indexstyle annex/local.bib ../../bibliography/pl.bib | ${Build}
|
---|
[23c27039] | 74 | # Must have *.aux file containing citations for bibtex
|
---|
| 75 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
|
---|
| 76 | -${BibTeX} ${Build}/${basename $@}
|
---|
| 77 | # Some citations reference others so run again to resolve these citations
|
---|
| 78 | ${LaTeX} ${basename $@}.tex
|
---|
| 79 | -${BibTeX} ${Build}/${basename $@}
|
---|
| 80 | # Make index from *.aux entries and input index at end of document
|
---|
| 81 | makeglossaries -q -s ${Build}/${basename $@}.ist ${Build}/${basename $@}
|
---|
| 82 | -version.sh
|
---|
| 83 | # Run again to finish citations
|
---|
| 84 | ${LaTeX} ${basename $@}.tex
|
---|
[694ee7d] | 85 |
|
---|
| 86 | ## Define the default recipes.
|
---|
| 87 |
|
---|
[23c27039] | 88 | ${Build}:
|
---|
| 89 | mkdir -p ${Build}
|
---|
[694ee7d] | 90 |
|
---|
[e8db295] | 91 | %.tex : %.fig ${Build}
|
---|
[23c27039] | 92 | fig2dev -L eepic $< > ${Build}/$@
|
---|
[694ee7d] | 93 |
|
---|
[484ee53] | 94 | %.ps : %.fig | ${Build}
|
---|
[23c27039] | 95 | fig2dev -L ps $< > ${Build}/$@
|
---|
[694ee7d] | 96 |
|
---|
[484ee53] | 97 | %.pstex : %.fig | ${Build}
|
---|
[23c27039] | 98 | fig2dev -L pstex $< > ${Build}/$@
|
---|
| 99 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
|
---|
[694ee7d] | 100 |
|
---|
[e76bd39] | 101 | #-----------------------------------------------------------------------------------
|
---|
| 102 | # Tools to generate png files
|
---|
| 103 | # to create a png we create a pdf and convert it to png
|
---|
[e8db295] | 104 | %.png : build/%.pstex figures/%.tex ${Build}
|
---|
[e76bd39] | 105 | echo ${basename $@}
|
---|
| 106 | ${LaTeX} figures/${basename $@}.tex
|
---|
| 107 | dvips build/${basename $@}.dvi -o build/${basename $@}.ps
|
---|
| 108 | ps2pdf build/${basename $@}.ps
|
---|
| 109 | convert -negate ${basename $@}.pdf $@
|
---|
| 110 |
|
---|
| 111 | # creating a pdf of a figure requires generating some latex that just includes the figure
|
---|
[e8db295] | 112 | figures/%.tex: build/%.pstex ${Build}
|
---|
[f739788] | 113 | echo -n "\documentclass[preview]{standalone}\n" \
|
---|
| 114 | "\usepackage[T1]{fontenc}\n" \
|
---|
| 115 | "\usepackage[usenames]{color}\n" \
|
---|
| 116 | "\usepackage{graphicx}\n" \
|
---|
| 117 | "\usepackage{listings}\n" \
|
---|
| 118 | "\usepackage{xspace}\n" \
|
---|
| 119 | "\input{style}\n" \
|
---|
| 120 | "\\\\begin{document}\n" \
|
---|
| 121 | "{\\\\resizebox{3\\\\textwidth}{!}{\input{${basename ${notdir $@}}.pstex_t}}}\n" \
|
---|
| 122 | "\end{document}" > $@
|
---|
| 123 |
|
---|
[694ee7d] | 124 | # Local Variables: #
|
---|
| 125 | # compile-command: "make" #
|
---|
| 126 | # End: #
|
---|