[5ff188f] | 1 | ## Define the configuration variables.
|
---|
[f60d997] | 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
|
---|
[f60d997] | 9 |
|
---|
[5ff188f] | 10 | MAKEFLAGS = --no-print-directory --silent #
|
---|
[23c27039] | 11 | VPATH = ${Build} ${Figures}
|
---|
[5ff188f] | 12 |
|
---|
[f60d997] | 13 | ## Define the text source files.
|
---|
| 14 |
|
---|
[a188b16] | 15 | SOURCES = ${addsuffix .tex, \
|
---|
[f60d997] | 16 | refrat \
|
---|
[83e680d] | 17 | keywords \
|
---|
[92c0f81] | 18 | operidents \
|
---|
[f60d997] | 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 = refrat.pdf
|
---|
| 36 |
|
---|
| 37 | # Directives #
|
---|
| 38 |
|
---|
[5ff188f] | 39 | .PHONY : all clean # not file names
|
---|
| 40 |
|
---|
[f60d997] | 41 | all : ${DOCUMENT}
|
---|
| 42 |
|
---|
| 43 | clean :
|
---|
[5ff188f] | 44 | @rm -frv ${DOCUMENT} ${basename ${DOCUMENT}}.ps ${Build}
|
---|
[f60d997] | 45 |
|
---|
| 46 | # File Dependencies #
|
---|
| 47 |
|
---|
| 48 | ${DOCUMENT} : ${basename ${DOCUMENT}}.ps
|
---|
| 49 | ps2pdf $<
|
---|
| 50 |
|
---|
| 51 | ${basename ${DOCUMENT}}.ps : ${basename ${DOCUMENT}}.dvi
|
---|
[5ff188f] | 52 | dvips ${Build}/$< -o $@
|
---|
[f60d997] | 53 |
|
---|
[23c27039] | 54 | ${basename ${DOCUMENT}}.dvi : Makefile ${Build} ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} \
|
---|
[5ff188f] | 55 | ${Macros}/common.tex ${Macros}/lstlang.sty ${Macros}/indexstyle ../bibliography/pl.bib
|
---|
[ce6c57c] | 56 | # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
|
---|
[5ff188f] | 57 | if [ ! -r ${basename $@}.ind ] ; then touch ${Build}/${basename $@}.ind ; fi
|
---|
[ce6c57c] | 58 | # Must have *.aux file containing citations for bibtex
|
---|
[f60d997] | 59 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
|
---|
[5ff188f] | 60 | -${BibTeX} ${Build}/${basename $@}
|
---|
| 61 | # Some citations reference others so run again to resolve these citations
|
---|
[f60d997] | 62 | ${LaTeX} ${basename $@}.tex
|
---|
[5ff188f] | 63 | -${BibTeX} ${Build}/${basename $@}
|
---|
[ce6c57c] | 64 | # Make index from *.aux entries and input index at end of document
|
---|
[5ff188f] | 65 | makeindex -s ${Macros}/indexstyle ${Build}/${basename $@}.idx
|
---|
| 66 | # Run again to finish citations
|
---|
[ce6c57c] | 67 | ${LaTeX} ${basename $@}.tex
|
---|
| 68 | # Run again to get index title into table of contents
|
---|
| 69 | ${LaTeX} ${basename $@}.tex
|
---|
[f60d997] | 70 |
|
---|
[20e409e] | 71 | predefined :
|
---|
| 72 | sed -f predefined.sed ${basename ${DOCUMENT}}.tex > ${basename $@}.cf
|
---|
| 73 |
|
---|
[f60d997] | 74 | ## Define the default recipes.
|
---|
| 75 |
|
---|
[5ff188f] | 76 | ${Build}:
|
---|
| 77 | mkdir -p ${Build}
|
---|
| 78 |
|
---|
[f60d997] | 79 | %.tex : %.fig
|
---|
[5ff188f] | 80 | fig2dev -L eepic $< > ${Build}/$@
|
---|
[f60d997] | 81 |
|
---|
| 82 | %.ps : %.fig
|
---|
[5ff188f] | 83 | fig2dev -L ps $< > ${Build}/$@
|
---|
[f60d997] | 84 |
|
---|
[83e9bd3] | 85 | %.pstex : %.fig
|
---|
[5ff188f] | 86 | fig2dev -L pstex $< > ${Build}/$@
|
---|
| 87 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
|
---|
[83e9bd3] | 88 |
|
---|
[f60d997] | 89 | # Local Variables: #
|
---|
| 90 | # compile-command: "make" #
|
---|
| 91 | # End: #
|
---|