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