[46ab782] | 1 | ## Define the configuration variables. |
---|
| 2 | |
---|
| 3 | Build = build |
---|
| 4 | Figures = figures |
---|
| 5 | Macros = ../../LaTeXmacros |
---|
| 6 | TeXLIB = .:style:text:${Macros}:${Build}:../../bibliography: |
---|
| 7 | LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build} |
---|
| 8 | BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex -terse |
---|
| 9 | |
---|
| 10 | MAKEFLAGS = --no-print-directory --silent # |
---|
| 11 | VPATH = ${Build} ${Figures} |
---|
| 12 | |
---|
| 13 | ## Define the text source files. |
---|
| 14 | |
---|
[512d937c] | 15 | SOURCES = ${addsuffix .tex, \ |
---|
| 16 | text/CFA_intro \ |
---|
| 17 | text/actors \ |
---|
| 18 | text/frontpgs \ |
---|
| 19 | text/CFA_concurrency \ |
---|
| 20 | thesis \ |
---|
| 21 | text/mutex_stmt \ |
---|
| 22 | text/channels \ |
---|
[46ab782] | 23 | } |
---|
| 24 | |
---|
[0faacb8] | 25 | FIGURES = ${addsuffix .pgf, \ |
---|
| 26 | figures/pykeExecutor \ |
---|
| 27 | figures/pykeCFAExecutor \ |
---|
| 28 | figures/nasusExecutor \ |
---|
| 29 | figures/nasusCFAExecutor \ |
---|
| 30 | figures/pykeMatrix \ |
---|
| 31 | figures/pykeCFAMatrix \ |
---|
| 32 | figures/nasusMatrix \ |
---|
| 33 | figures/nasusCFAMatrix \ |
---|
| 34 | figures/pykeRepeat \ |
---|
| 35 | figures/pykeCFARepeat \ |
---|
| 36 | figures/nasusRepeat \ |
---|
| 37 | figures/nasusCFARepeat \ |
---|
| 38 | figures/pykeCFABalance-One \ |
---|
| 39 | figures/nasusCFABalance-One \ |
---|
| 40 | figures/pykeCFABalance-Multi \ |
---|
| 41 | figures/nasusCFABalance-Multi \ |
---|
[512d937c] | 42 | figures/pyke_Aggregate_Lock_2 \ |
---|
| 43 | figures/pyke_Aggregate_Lock_4 \ |
---|
| 44 | figures/pyke_Aggregate_Lock_8 \ |
---|
| 45 | figures/nasus_Aggregate_Lock_2 \ |
---|
| 46 | figures/nasus_Aggregate_Lock_4 \ |
---|
| 47 | figures/nasus_Aggregate_Lock_8 \ |
---|
[46ab782] | 48 | } |
---|
| 49 | |
---|
[0faacb8] | 50 | DATA = data/pykeSendStatic \ |
---|
| 51 | data/pykeSendDynamic \ |
---|
| 52 | data/pykeExecutorMem \ |
---|
| 53 | data/nasusSendStatic \ |
---|
| 54 | data/nasusSendDynamic \ |
---|
| 55 | data/pykeExecutorMem \ |
---|
| 56 | |
---|
| 57 | PICTURES = ${addsuffix .tikz, \ |
---|
| 58 | diagrams/standard_actor \ |
---|
| 59 | diagrams/inverted_actor \ |
---|
| 60 | diagrams/gulp \ |
---|
| 61 | diagrams/chain_swap \ |
---|
| 62 | diagrams/M_to_one_swap \ |
---|
| 63 | diagrams/acyclic_swap \ |
---|
| 64 | diagrams/cyclic_swap \ |
---|
[46ab782] | 65 | } |
---|
| 66 | |
---|
| 67 | PROGRAMS = ${addsuffix .tex, \ |
---|
| 68 | } |
---|
| 69 | |
---|
| 70 | GRAPHS = ${addsuffix .tex, \ |
---|
| 71 | } |
---|
| 72 | |
---|
| 73 | ## Define the documents that need to be made. |
---|
| 74 | |
---|
| 75 | DOCUMENT = thesis.pdf |
---|
| 76 | BASE = ${basename ${DOCUMENT}} |
---|
| 77 | |
---|
| 78 | # Directives # |
---|
| 79 | |
---|
| 80 | .PHONY : all clean # not file names |
---|
| 81 | |
---|
| 82 | all : ${DOCUMENT} |
---|
| 83 | |
---|
| 84 | clean : |
---|
| 85 | @rm -frv ${DOCUMENT} ${BASE}.ps ${Build} |
---|
| 86 | |
---|
| 87 | # File Dependencies # |
---|
| 88 | |
---|
| 89 | ${DOCUMENT} : ${BASE}.ps |
---|
| 90 | ps2pdf $< |
---|
| 91 | |
---|
| 92 | ${BASE}.ps : ${BASE}.dvi |
---|
| 93 | dvips ${Build}/$< -o $@ |
---|
| 94 | |
---|
[0faacb8] | 95 | ${BASE}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${DATA} \ |
---|
[46ab782] | 96 | ${Macros}/common.tex ${Macros}/indexstyle local.bib ../../bibliography/pl.bib | ${Build} |
---|
| 97 | # Must have *.aux file containing citations for bibtex |
---|
| 98 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi |
---|
| 99 | -${BibTeX} ${Build}/${basename $@} |
---|
| 100 | # Some citations reference others so run again to resolve these citations |
---|
| 101 | ${LaTeX} ${basename $@}.tex |
---|
| 102 | -${BibTeX} ${Build}/${basename $@} |
---|
| 103 | # Make index from *.aux entries and input index at end of document |
---|
| 104 | makeglossaries -q -s ${Build}/${basename $@}.ist ${Build}/${basename $@} |
---|
| 105 | -version.sh |
---|
| 106 | # Run again to finish citations |
---|
| 107 | ${LaTeX} ${basename $@}.tex |
---|
[601bd9e] | 108 | |
---|
[46ab782] | 109 | |
---|
| 110 | ## Define the default recipes. |
---|
| 111 | |
---|
| 112 | ${Build}: |
---|
| 113 | mkdir -p ${Build} |
---|
| 114 | |
---|
| 115 | %.tex : %.fig ${Build} |
---|
| 116 | fig2dev -L eepic $< > ${Build}/$@ |
---|
| 117 | |
---|
| 118 | %.ps : %.fig | ${Build} |
---|
| 119 | fig2dev -L ps $< > ${Build}/$@ |
---|
| 120 | |
---|
| 121 | %.pstex : %.fig | ${Build} |
---|
| 122 | fig2dev -L pstex $< > ${Build}/$@ |
---|
| 123 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t |
---|
| 124 | |
---|
| 125 | #----------------------------------------------------------------------------------- |
---|
| 126 | # Tools to generate png files |
---|
| 127 | # to create a png we create a pdf and convert it to png |
---|
| 128 | %.png : build/%.pstex figures/%.tex ${Build} |
---|
| 129 | echo ${basename $@} |
---|
| 130 | ${LaTeX} figures/${basename $@}.tex |
---|
| 131 | dvips build/${basename $@}.dvi -o build/${basename $@}.ps |
---|
| 132 | ps2pdf build/${basename $@}.ps |
---|
| 133 | convert -negate ${basename $@}.pdf $@ |
---|
| 134 | |
---|
| 135 | # creating a pdf of a figure requires generating some latex that just includes the figure |
---|
| 136 | figures/%.tex: build/%.pstex ${Build} |
---|
| 137 | echo -n "\documentclass[preview]{standalone}\n" \ |
---|
| 138 | "\usepackage[T1]{fontenc}\n" \ |
---|
| 139 | "\usepackage[usenames]{color}\n" \ |
---|
| 140 | "\usepackage{graphicx}\n" \ |
---|
| 141 | "\usepackage{listings}\n" \ |
---|
| 142 | "\usepackage{xspace}\n" \ |
---|
| 143 | "\input{style}\n" \ |
---|
| 144 | "\\\\begin{document}\n" \ |
---|
| 145 | "{\\\\resizebox{3\\\\textwidth}{!}{\input{${basename ${notdir $@}}.pstex_t}}}\n" \ |
---|
| 146 | "\end{document}" > $@ |
---|
| 147 | |
---|
[0faacb8] | 148 | data/%: ; |
---|
| 149 | %.tikz: ; |
---|
| 150 | %.pgf: ; |
---|
| 151 | |
---|
[46ab782] | 152 | # Local Variables: # |
---|
| 153 | # compile-command: "make" # |
---|
| 154 | # End: # |
---|