[697c957] | 1 | ## Define the configuration variables. |
---|
| 2 | |
---|
| 3 | Build = build |
---|
| 4 | Figures = figures |
---|
| 5 | Macros = ../LaTeXmacros |
---|
| 6 | TeXLIB = .:${Macros}:${Build}: |
---|
| 7 | LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build} |
---|
| 8 | BibTeX = BIBINPUTS=../bibliography: && export BIBINPUTS && bibtex |
---|
| 9 | |
---|
| 10 | MAKEFLAGS = --no-print-directory --silent # |
---|
| 11 | VPATH = ${Build} ${Figures} |
---|
| 12 | |
---|
| 13 | ## Define the text source files. |
---|
| 14 | |
---|
| 15 | SOURCES = ${addsuffix .tex, \ |
---|
| 16 | uC++toCFA \ |
---|
| 17 | ../refrat/keywords \ |
---|
| 18 | ../refrat/operidents \ |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | FIGURES = ${addsuffix .tex, \ |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | PICTURES = ${addsuffix .pstex, \ |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | PROGRAMS = ${addsuffix .tex, \ |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | GRAPHS = ${addsuffix .tex, \ |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | ## Define the documents that need to be made. |
---|
| 34 | |
---|
| 35 | DOCUMENT = uC++toCFA.pdf |
---|
| 36 | BASE = ${basename ${DOCUMENT}} |
---|
| 37 | |
---|
| 38 | # Directives # |
---|
| 39 | |
---|
| 40 | .PHONY : all clean # not file names |
---|
| 41 | |
---|
| 42 | all : ${DOCUMENT} |
---|
| 43 | |
---|
| 44 | clean : |
---|
| 45 | @rm -frv ${DOCUMENT} ${BASE}.ps ${Build} |
---|
| 46 | |
---|
| 47 | # File Dependencies # |
---|
| 48 | |
---|
| 49 | build/version: ../../configure | ${Build} |
---|
| 50 | ../../configure --version | grep "cfa-cc configure" | grep -oEe "([0-9]+\.)+[0-9]+" > $@ |
---|
| 51 | |
---|
| 52 | ${DOCUMENT} : ${BASE}.ps |
---|
| 53 | ps2pdf -dPDFSETTINGS=/prepress $< |
---|
| 54 | |
---|
| 55 | ${BASE}.ps : ${BASE}.dvi |
---|
| 56 | dvips ${Build}/$< -o $@ |
---|
| 57 | |
---|
| 58 | ${BASE}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} \ |
---|
| 59 | ${Macros}/common.sty ${Macros}/lstlang.sty ${Macros}/indexstyle ../bibliography/pl.bib build/version | ${Build} |
---|
| 60 | # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run. |
---|
| 61 | if [ ! -r ${basename $@}.ind ] ; then touch ${Build}/${basename $@}.ind ; fi |
---|
| 62 | # Must have *.aux file containing citations for bibtex |
---|
| 63 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi |
---|
| 64 | -${BibTeX} ${Build}/${basename $@} |
---|
| 65 | # Some citations reference others so run again to resolve these citations |
---|
| 66 | ${LaTeX} ${basename $@}.tex |
---|
| 67 | # -${BibTeX} ${Build}/${basename $@} |
---|
| 68 | # Make index from *.aux entries and input index at end of document |
---|
| 69 | makeindex -s ${Macros}/indexstyle ${Build}/${basename $@}.idx |
---|
| 70 | # Run again to finish citations |
---|
| 71 | ${LaTeX} ${basename $@}.tex |
---|
| 72 | # Run again to get index title into table of contents |
---|
| 73 | # ${LaTeX} ${basename $@}.tex |
---|
| 74 | |
---|
| 75 | ## Define the default recipes. |
---|
| 76 | |
---|
| 77 | ${Build} : |
---|
| 78 | mkdir -p ${Build} |
---|
| 79 | |
---|
| 80 | %.tex : %.fig | ${Build} |
---|
| 81 | fig2dev -L eepic $< > ${Build}/$@ |
---|
| 82 | |
---|
| 83 | %.ps : %.fig | ${Build} |
---|
| 84 | fig2dev -L ps $< > ${Build}/$@ |
---|
| 85 | |
---|
| 86 | %.pstex : %.fig | ${Build} |
---|
| 87 | fig2dev -L pstex $< > ${Build}/$@ |
---|
| 88 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t |
---|
| 89 | |
---|
| 90 | # Local Variables: # |
---|
| 91 | # compile-command: "make" # |
---|
| 92 | # End: # |
---|