source: doc/theses/colby_parsons_MMAth/Makefile @ cec2551

ADTast-experimental
Last change on this file since cec2551 was 601bd9e, checked in by caparsons <caparson@…>, 21 months ago

added figures, code examples and more to thesis stuff. wrote many more pages on actors

  • Property mode set to 100644
File size: 3.0 KB
Line 
1## Define the configuration variables.
2
3Build = build
4Figures = figures
5Macros = ../../LaTeXmacros
6TeXLIB = .:style:text:${Macros}:${Build}:../../bibliography:
7LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
8BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex -terse
9
10MAKEFLAGS = --no-print-directory --silent #
11VPATH = ${Build} ${Figures}
12
13## Define the text source files.
14
15SOURCES = ${addsuffix .tex, \
16text/CFA_intro \
17text/actors \
18thesis \
19}
20
21FIGURES = ${addsuffix .tikz, \
22figures/standard_actor \
23figures/inverted_actor \
24figures/gulp \
25}
26
27PICTURES = ${addsuffix .pstex, \
28}
29
30PROGRAMS = ${addsuffix .tex, \
31}
32
33GRAPHS = ${addsuffix .tex, \
34}
35
36## Define the documents that need to be made.
37
38DOCUMENT = thesis.pdf
39BASE = ${basename ${DOCUMENT}}
40
41# Directives #
42
43.PHONY : all clean                                      # not file names
44
45all : ${DOCUMENT}
46
47clean :
48        @rm -frv ${DOCUMENT} ${BASE}.ps ${Build}
49
50# File Dependencies #
51
52${DOCUMENT} : ${BASE}.ps
53        ps2pdf $<
54
55${BASE}.ps : ${BASE}.dvi
56        dvips ${Build}/$< -o $@
57
58${BASE}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} \
59                ${Macros}/common.tex ${Macros}/indexstyle local.bib ../../bibliography/pl.bib | ${Build}
60        # Must have *.aux file containing citations for bibtex
61        if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
62        -${BibTeX} ${Build}/${basename $@}
63        # Some citations reference others so run again to resolve these citations
64        ${LaTeX} ${basename $@}.tex
65        -${BibTeX} ${Build}/${basename $@}
66        # Make index from *.aux entries and input index at end of document
67        makeglossaries -q -s ${Build}/${basename $@}.ist ${Build}/${basename $@}
68        -version.sh
69        # Run again to finish citations
70        ${LaTeX} ${basename $@}.tex
71       
72
73## Define the default recipes.
74
75${Build}:
76        mkdir -p ${Build}
77
78%.tex : %.fig ${Build}
79        fig2dev -L eepic $< > ${Build}/$@
80
81%.ps : %.fig | ${Build}
82        fig2dev -L ps $< > ${Build}/$@
83
84%.pstex : %.fig | ${Build}
85        fig2dev -L pstex $< > ${Build}/$@
86        fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
87
88#-----------------------------------------------------------------------------------
89# Tools to generate png files
90# to create a png we create a pdf and convert it to png
91%.png : build/%.pstex figures/%.tex ${Build}
92        echo ${basename $@}
93        ${LaTeX} figures/${basename $@}.tex
94        dvips build/${basename $@}.dvi -o build/${basename $@}.ps
95        ps2pdf build/${basename $@}.ps
96        convert -negate ${basename $@}.pdf $@
97
98# creating a pdf of a figure requires generating some latex that just includes the figure
99figures/%.tex: build/%.pstex ${Build}
100        echo -n         "\documentclass[preview]{standalone}\n"         \
101                        "\usepackage[T1]{fontenc}\n"                    \
102                        "\usepackage[usenames]{color}\n"                \
103                        "\usepackage{graphicx}\n"                       \
104                        "\usepackage{listings}\n"                       \
105                        "\usepackage{xspace}\n"                         \
106                        "\input{style}\n"                               \
107                        "\\\\begin{document}\n"                         \
108                        "{\\\\resizebox{3\\\\textwidth}{!}{\input{${basename ${notdir $@}}.pstex_t}}}\n" \
109                        "\end{document}" > $@
110
111# Local Variables: #
112# compile-command: "make" #
113# End: #
Note: See TracBrowser for help on using the repository browser.