[df75fe97] | 1 | ## Define the configuration variables.
|
---|
| 2 |
|
---|
| 3 | Build = build
|
---|
[2ad74d8] | 4 | Figures = img
|
---|
[df75fe97] | 5 | Macros = ../../../LaTeXmacros
|
---|
| 6 | TeXLIB = .:${Macros}:${Build}:../../../bibliography:
|
---|
| 7 | LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
|
---|
| 8 | BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
|
---|
| 9 |
|
---|
| 10 | MAKEFLAGS = --no-print-directory --silent #
|
---|
| 11 | VPATH = ${Build} ${Figures}
|
---|
| 12 |
|
---|
| 13 | ## Define the text source files.
|
---|
| 14 | FIGURES = ${addsuffix .tex, \
|
---|
[a037f85] | 15 | emptybit \
|
---|
| 16 | emptytree \
|
---|
[7a0f1d25] | 17 | emptytls \
|
---|
[a037f85] | 18 | resize \
|
---|
[df75fe97] | 19 | }
|
---|
| 20 |
|
---|
| 21 | PICTURES = ${addsuffix .pstex, \
|
---|
[8d8ac3b] | 22 | base \
|
---|
| 23 | empty \
|
---|
| 24 | system \
|
---|
[df75fe97] | 25 | }
|
---|
| 26 |
|
---|
| 27 | PROGRAMS = ${addsuffix .tex, \
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | GRAPHS = ${addsuffix .tex, \
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | ## Define the documents that need to be made.
|
---|
[8d8ac3b] | 34 | all: comp_II.pdf presentation.pdf
|
---|
| 35 | comp_II.pdf: ${FIGURES} ${PICTURES}
|
---|
| 36 | presentation.pdf: presentationstyle.sty base.dark.pstex empty.dark.pstex system.dark.pstex
|
---|
[df75fe97] | 37 |
|
---|
[8d8ac3b] | 38 | DOCUMENT = comp_II.pdf presentation.pdf
|
---|
[df75fe97] | 39 | BASE = ${basename ${DOCUMENT}}
|
---|
| 40 |
|
---|
| 41 | # Directives #
|
---|
| 42 |
|
---|
| 43 | .PHONY : all clean # not file names
|
---|
| 44 |
|
---|
| 45 | all : ${DOCUMENT}
|
---|
| 46 |
|
---|
| 47 | clean :
|
---|
| 48 | @rm -frv ${DOCUMENT} ${BASE}.ps ${Build}
|
---|
| 49 |
|
---|
| 50 | # File Dependencies #
|
---|
| 51 |
|
---|
[8d8ac3b] | 52 | %.pdf : build/%.ps | ${Build}
|
---|
[df75fe97] | 53 | ps2pdf $<
|
---|
| 54 |
|
---|
[8d8ac3b] | 55 | build/%.ps : build/%.dvi | ${Build}
|
---|
| 56 | dvips $< -o $@
|
---|
[df75fe97] | 57 |
|
---|
[8d8ac3b] | 58 | build/%.dvi : %.tex Makefile | ${Build}
|
---|
[df75fe97] | 59 | # Must have *.aux file containing citations for bibtex
|
---|
[8d8ac3b] | 60 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} $< ; fi
|
---|
| 61 | -${BibTeX} ${basename $@}
|
---|
[df75fe97] | 62 | # Some citations reference others so run again to resolve these citations
|
---|
[8d8ac3b] | 63 | ${LaTeX} $<
|
---|
| 64 | -${BibTeX} ${basename $@}
|
---|
[df75fe97] | 65 | # Make index from *.aux entries and input index at end of document
|
---|
[8d8ac3b] | 66 | -makeglossaries -q -s ${basename $@}.ist ${basename $@}
|
---|
[df75fe97] | 67 | # Run again to finish citations
|
---|
[8d8ac3b] | 68 | ${LaTeX} $<
|
---|
[df75fe97] | 69 |
|
---|
| 70 | ## Define the default recipes.
|
---|
| 71 |
|
---|
| 72 | ${Build}:
|
---|
| 73 | mkdir -p ${Build}
|
---|
| 74 |
|
---|
[8d8ac3b] | 75 | %.tex : img/%.fig | ${Build}
|
---|
[df75fe97] | 76 | fig2dev -L eepic $< > ${Build}/$@
|
---|
| 77 |
|
---|
[a037f85] | 78 | %.ps : img/%.fig | ${Build}
|
---|
[df75fe97] | 79 | fig2dev -L ps $< > ${Build}/$@
|
---|
| 80 |
|
---|
[a037f85] | 81 | %.pstex : img/%.fig | ${Build}
|
---|
[df75fe97] | 82 | fig2dev -L pstex $< > ${Build}/$@
|
---|
| 83 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
|
---|
| 84 |
|
---|
[8d8ac3b] | 85 | ## pstex with inverted colors
|
---|
| 86 | %.dark.pstex : img/%.fig Makefile | ${Build}
|
---|
| 87 | fig2dev -L pstex $< > ${Build}/$@
|
---|
| 88 | sed -i 's/\/col-1 {0 setgray} bind def/\/col-1 {1 setgray} bind def/g' ${Build}/$@
|
---|
| 89 | sed -i 's/\/col0 {0.000 0.000 0.000 srgb} bind def/\/col0 {1.000 1.000 1.000 srgb} bind def/g' ${Build}/$@
|
---|
| 90 | sed -i 's/\/col7 {1.000 1.000 1.000 srgb} bind def/\/col7 {0.000 0.000 0.000 srgb} bind def/g' ${Build}/$@
|
---|
| 91 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
|
---|
| 92 |
|
---|
[df75fe97] | 93 | # Local Variables: #
|
---|
| 94 | # compile-command: "make" #
|
---|
| 95 | # End: #
|
---|