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