## Define the appropriate configuration variables. TeXLIB = .:../../LaTeXmacros:../../LaTeXmacros/listings:../../LaTeXmacros/enumitem:~/bibliographies: LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex ## Define the text source files. SOURCES = ${addsuffix .tex, \ thesis \ style \ cfa-format \ glossary \ } FIGURES = ${addsuffix .tex, \ monitor \ ext_monitor \ } PICTURES = ${addsuffix .pstex, \ } PROGRAMS = ${addsuffix .tex, \ } GRAPHS = ${addsuffix .tex, \ } ## Define the documents that need to be made. DOCUMENT = thesis.pdf # Directives # all : ${DOCUMENT} clean : rm -f *.bbl *.aux *.dvi *.idx *.ilg *.ind *.brf *.out *.log *.toc *.blg *.pstex_t *.cf *.glg *.glo *.gls *.ist *.acn *.acr *.alg \ ${FIGURES} ${PICTURES} ${PROGRAMS} ${GRAPHS} ${basename ${DOCUMENT}}.ps ${DOCUMENT} # File Dependencies # ${DOCUMENT} : build/${basename ${DOCUMENT}}.ps ps2pdf $< build/${basename ${DOCUMENT}}.ps : ${basename ${DOCUMENT}}.dvi dvips $< -o $@ build/${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex \ ../../LaTeXmacros/common.tex ../../LaTeXmacros/indexstyle # Conditionally create the build folder if [ ! -r build ] ; then mkdir build ; fi # # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run. # if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi # # Must have *.aux file containing citations for bibtex # if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi # -${BibTeX} ${basename $@} # # Some citations reference others so run steps again to resolve these citations # ${LaTeX} ${basename $@}.tex # -${BibTeX} ${basename $@} # # Make index from *.aux entries and input index at end of document # makeglossaries ${basename $@} # #${LaTeX} ${basename $@}.tex # # Run again to get index title into table of contents # ${LaTeX} ${basename $@}.tex # -./bump_ver.sh # ${LaTeX} ${basename $@}.tex predefined : sed -f predefined.sed ${basename ${DOCUMENT}}.tex > ${basename $@}.cf ## Define the default recipes. build/%.tex : %.fig fig2dev -L eepic $< > $@ build/%.ps : %.fig fig2dev -L ps $< > $@ build/%.pstex : %.fig fig2dev -L pstex $< > $@ fig2dev -L pstex_t -p $@ $< > $@_t # Local Variables: # # compile-command: "make" # # End: #