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