[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 \ |
---|
[6e83384] | 48 | figures/nasus_Channel_Contention \ |
---|
| 49 | figures/pyke_Channel_Contention \ |
---|
[46ab782] | 50 | } |
---|
| 51 | |
---|
[0faacb8] | 52 | DATA = data/pykeSendStatic \ |
---|
| 53 | data/pykeSendDynamic \ |
---|
| 54 | data/pykeExecutorMem \ |
---|
| 55 | data/nasusSendStatic \ |
---|
| 56 | data/nasusSendDynamic \ |
---|
| 57 | data/pykeExecutorMem \ |
---|
| 58 | |
---|
| 59 | PICTURES = ${addsuffix .tikz, \ |
---|
| 60 | diagrams/standard_actor \ |
---|
| 61 | diagrams/inverted_actor \ |
---|
| 62 | diagrams/gulp \ |
---|
| 63 | diagrams/chain_swap \ |
---|
| 64 | diagrams/M_to_one_swap \ |
---|
| 65 | diagrams/acyclic_swap \ |
---|
| 66 | diagrams/cyclic_swap \ |
---|
[46ab782] | 67 | } |
---|
| 68 | |
---|
| 69 | PROGRAMS = ${addsuffix .tex, \ |
---|
| 70 | } |
---|
| 71 | |
---|
| 72 | GRAPHS = ${addsuffix .tex, \ |
---|
| 73 | } |
---|
| 74 | |
---|
| 75 | ## Define the documents that need to be made. |
---|
| 76 | |
---|
| 77 | DOCUMENT = thesis.pdf |
---|
| 78 | BASE = ${basename ${DOCUMENT}} |
---|
| 79 | |
---|
| 80 | # Directives # |
---|
| 81 | |
---|
| 82 | .PHONY : all clean # not file names |
---|
| 83 | |
---|
| 84 | all : ${DOCUMENT} |
---|
| 85 | |
---|
| 86 | clean : |
---|
| 87 | @rm -frv ${DOCUMENT} ${BASE}.ps ${Build} |
---|
| 88 | |
---|
| 89 | # File Dependencies # |
---|
| 90 | |
---|
| 91 | ${DOCUMENT} : ${BASE}.ps |
---|
| 92 | ps2pdf $< |
---|
| 93 | |
---|
| 94 | ${BASE}.ps : ${BASE}.dvi |
---|
| 95 | dvips ${Build}/$< -o $@ |
---|
| 96 | |
---|
[0faacb8] | 97 | ${BASE}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${DATA} \ |
---|
[46ab782] | 98 | ${Macros}/common.tex ${Macros}/indexstyle local.bib ../../bibliography/pl.bib | ${Build} |
---|
| 99 | # Must have *.aux file containing citations for bibtex |
---|
| 100 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi |
---|
| 101 | -${BibTeX} ${Build}/${basename $@} |
---|
| 102 | # Some citations reference others so run again to resolve these citations |
---|
[678c540] | 103 | # ${LaTeX} ${basename $@}.tex |
---|
| 104 | # -${BibTeX} ${Build}/${basename $@} |
---|
[46ab782] | 105 | # Make index from *.aux entries and input index at end of document |
---|
| 106 | makeglossaries -q -s ${Build}/${basename $@}.ist ${Build}/${basename $@} |
---|
| 107 | -version.sh |
---|
| 108 | # Run again to finish citations |
---|
| 109 | ${LaTeX} ${basename $@}.tex |
---|
[601bd9e] | 110 | |
---|
[46ab782] | 111 | |
---|
| 112 | ## Define the default recipes. |
---|
| 113 | |
---|
| 114 | ${Build}: |
---|
| 115 | mkdir -p ${Build} |
---|
| 116 | |
---|
| 117 | %.tex : %.fig ${Build} |
---|
| 118 | fig2dev -L eepic $< > ${Build}/$@ |
---|
| 119 | |
---|
| 120 | %.ps : %.fig | ${Build} |
---|
| 121 | fig2dev -L ps $< > ${Build}/$@ |
---|
| 122 | |
---|
| 123 | %.pstex : %.fig | ${Build} |
---|
| 124 | fig2dev -L pstex $< > ${Build}/$@ |
---|
| 125 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t |
---|
| 126 | |
---|
| 127 | #----------------------------------------------------------------------------------- |
---|
| 128 | # Tools to generate png files |
---|
| 129 | # to create a png we create a pdf and convert it to png |
---|
| 130 | %.png : build/%.pstex figures/%.tex ${Build} |
---|
| 131 | echo ${basename $@} |
---|
| 132 | ${LaTeX} figures/${basename $@}.tex |
---|
| 133 | dvips build/${basename $@}.dvi -o build/${basename $@}.ps |
---|
| 134 | ps2pdf build/${basename $@}.ps |
---|
| 135 | convert -negate ${basename $@}.pdf $@ |
---|
| 136 | |
---|
| 137 | # creating a pdf of a figure requires generating some latex that just includes the figure |
---|
| 138 | figures/%.tex: build/%.pstex ${Build} |
---|
| 139 | echo -n "\documentclass[preview]{standalone}\n" \ |
---|
| 140 | "\usepackage[T1]{fontenc}\n" \ |
---|
| 141 | "\usepackage[usenames]{color}\n" \ |
---|
| 142 | "\usepackage{graphicx}\n" \ |
---|
| 143 | "\usepackage{listings}\n" \ |
---|
| 144 | "\usepackage{xspace}\n" \ |
---|
| 145 | "\input{style}\n" \ |
---|
| 146 | "\\\\begin{document}\n" \ |
---|
| 147 | "{\\\\resizebox{3\\\\textwidth}{!}{\input{${basename ${notdir $@}}.pstex_t}}}\n" \ |
---|
| 148 | "\end{document}" > $@ |
---|
| 149 | |
---|
[0faacb8] | 150 | data/%: ; |
---|
| 151 | %.tikz: ; |
---|
| 152 | %.pgf: ; |
---|
| 153 | |
---|
[46ab782] | 154 | # Local Variables: # |
---|
| 155 | # compile-command: "make" # |
---|
| 156 | # End: # |
---|