## Define the configuration variables. Build = build Figures = img Macros = ../../../LaTeXmacros TeXLIB = .:${Macros}:${Build}:../../../bibliography: LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build} BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex MAKEFLAGS = --no-print-directory --silent # VPATH = ${Build} ${Figures} ## Define the text source files. TEXTS = ${addprefix text/, ${addsuffix .tex, \ front \ intro \ runtime \ core \ practice \ io \ }} FIGURES = ${addsuffix .tex, \ } PICTURES = ${addsuffix .pstex, \ base \ empty \ } PROGRAMS = ${addsuffix .tex, \ } GRAPHS = ${addsuffix .tex, \ } ## Define the documents that need to be made. all: thesis.pdf thesis.pdf: ${TEXTS} ${FIGURES} ${PICTURES} DOCUMENT = thesis.pdf BASE = ${basename ${DOCUMENT}} # Directives # .PHONY : all clean # not file names all : ${DOCUMENT} clean : @rm -frv ${DOCUMENT} ${BASE}.ps ${Build} # File Dependencies # %.pdf : build/%.ps | ${Build} ps2pdf $< build/%.ps : build/%.dvi | ${Build} dvips $< -o $@ build/%.dvi : %.tex Makefile | ${Build} # Must have *.aux file containing citations for bibtex if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} $< ; fi -${BibTeX} ${basename $@} # Some citations reference others so run again to resolve these citations ${LaTeX} $< -${BibTeX} ${basename $@} # Make index from *.aux entries and input index at end of document -makeglossaries -q -s ${basename $@}.ist ${basename $@} # Run again to finish citations ${LaTeX} $< ## Define the default recipes. ${Build}: mkdir -p ${Build} %.tex : fig/%.fig | ${Build} fig2dev -L eepic $< > ${Build}/$@ %.ps : fig/%.fig | ${Build} fig2dev -L ps $< > ${Build}/$@ %.pstex : fig/%.fig | ${Build} fig2dev -L pstex $< > ${Build}/$@ fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t ## pstex with inverted colors %.dark.pstex : fig/%.fig Makefile | ${Build} fig2dev -L pstex $< > ${Build}/$@ sed -i 's/\/col-1 {0 setgray} bind def/\/col-1 {1 setgray} bind def/g' ${Build}/$@ 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}/$@ 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}/$@ fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t # Local Variables: # # compile-command: "make" # # End: #