1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
# LaTeX -*-Makefile-*-
#
# Here's what this Makefile gives you:
#
# make dvi - Generates the DVI file, suitable for previewing
# make ps - Generates a postscript file suitable for printing
# make pdf - Generates a PDF file suitable for viewing/printing
# make all - Generates DVI, postscript, and PDF files
# make clean - Removes some intermediate files
# make squeaky - Removes all generated PS, DVI, and PDF files
#
#
# INSTRUCTIONS:
# -------------
#
# This first section contains macros whose values that you need to
# fill in.
#
# MAIN_TEX: In order to build your thesis/dissertation, fill in the
# MAIN_TEX macro with the name of your main .tex file -- the one that
# you invoke LaTeX on.
MAIN_TEX = example.tex
# CHAP_CITE_TEX: Some departments require bibliographies for each
# chapter. If your department only requires a single bibliography at
# the end of the work, leave this macro blank and go on to
# OTHER_SRC_FILES, below.
# If your department does require chapter bibliographies, put the
# filenames of your chapters in this macro (and do *not* list them
# again in OTHER_SRC_FILES, below). You will also need to use the
# "chapterbib" classfile -- see the example.tex for an
# example. You will also need to remove the \bibliographystyle{} and
# \bibliography{} commands from the top-level file
# (example.tex), and append them to the end of the files
# listed in CHAP_CITE_TEX.
CHAP_CITE_TEX =
#CHAP_CITE_TEX = \
# chapter1.tex \
# chapter2.tex \
# appendix.tex
# OTHER_SRC_FILES: Put in the names of all the other files that your
# thesis depends on (e.g., other .tex files, .eps figures, etc.) in
# the OTHER_SRC_FILES macro. This is ensure that whenever one of the
# "other" files changes, "make" will rebuild your paper properly. You
# should *not* list any files in this macro that were already listed
# in CHAP_CITE_TEX, above.
OTHER_SRC_FILES = \
sample_nd.eps \
sample_nd.pdf \
example.bib \
chapter1.tex \
chapter2.tex \
appendix.tex
# You should not need to change these, but just in case...
LATEX = latex
PDFLATEX = pdflatex
DVIPS = dvips
#########################################################################
#
# You should not need to edit below this line
#
#########################################################################
.SUFFIXES: .tex .dvi .pdf .ps
CHAP_CITE = $(CHAP_CITE_TEX:.tex=)
MAIN_DVI = $(MAIN_TEX:.tex=.dvi)
MAIN_PS = $(MAIN_TEX:.tex=.ps)
MAIN_PDF = $(MAIN_TEX:.tex=.pdf)
#
# Some common target names
# Note that the default target is "ps"
#
pdf: $(MAIN_PDF)
ps: $(MAIN_PS)
dvi: $(MAIN_DVI)
all: pdf dvi ps
#
# Make the dependencies so that things build when they need to
#
$(MAIN_PS): $(MAIN_DVI)
$(MAIN_DVI): $(MAIN_TEX) $(CITE_TEX) $(OTHER_SRC_FILES)
$(MAIN_PDF): $(MAIN_TEX) $(CITE_TEX) $(OTHER_SRC_FILES)
#
# General rules
#
.tex.dvi:
@$(LATEX) $*
@if ( grep 'LaTeX Warning: Label(s) may' $*.log > /dev/null ); \
then $(LATEX) $* ; \
else :; fi
@-if ( grep 'undefined citations' $*.log > /dev/null ); then \
if test "$(CHAP_CITE)" ; then \
for file in bogus $(CHAP_CITE) ; do \
if test "$$file" != "bogus"; then \
echo "RUNNING BIBTEX ON FILE: $$file"; \
bibtex $$file ; \
fi ; \
done ; \
else \
echo "RUNNING BIBTEX ON FILE: $*"; \
bibtex $* ; \
fi ; \
$(LATEX) $* ; \
fi
@if ( grep 'Warning: Label(s) may' $*.log > /dev/null || \
grep 'Rerun' $*.log > /dev/null || \
grep 'Warning: Citation' $*.log > /dev/null); \
then $(LATEX) $* ; else :; fi
@if ( grep 'Warning: Label(s) may' $*.log > /dev/null || \
grep 'Rerun' $*.log > /dev/null || \
grep 'Warning: Citation' $*.log > /dev/null); \
then $(LATEX) $* ; else :; fi
@if ( grep 'Warning: Label(s) may' $*.log > /dev/null || \
grep 'Rerun' $*.log > /dev/null || \
grep 'Warning: Citation' $*.log > /dev/null); \
then $(LATEX) $* ; else :; fi
.tex.pdf:
@$(PDFLATEX) $*
@if ( grep 'LaTeX Warning: Label(s) may' $*.log > /dev/null ); \
then $(PDFLATEX) $* ; \
else :; fi
@-if ( grep 'undefined citations' $*.log > /dev/null ); then \
if test "$(CHAP_CITE)" ; then \
for file in bogus $(CHAP_CITE) ; do \
if test "$$file" != "bogus"; then \
echo "RUNNING BIBTEX ON FILE: $$file"; \
bibtex $$file ; \
fi ; \
done ; \
else \
echo "RUNNING BIBTEX ON FILE: $*"; \
bibtex $* ; \
fi ; \
$(PDFLATEX) $* ; \
fi
@if ( grep 'Warning: Label(s) may' $*.log > /dev/null || \
grep 'Rerun' $*.log > /dev/null || \
grep 'Warning: Citation' $*.log > /dev/null); \
then $(PDFLATEX) $* ; else :; fi
@if ( grep 'Warning: Label(s) may' $*.log > /dev/null || \
grep 'Rerun' $*.log > /dev/null || \
grep 'Warning: Citation' $*.log > /dev/null); \
then $(PDFLATEX) $* ; else :; fi
@if ( grep 'Warning: Label(s) may' $*.log > /dev/null || \
grep 'Rerun' $*.log > /dev/null || \
grep 'Warning: Citation' $*.log > /dev/null); \
then $(PDFLATEX) $* ; else :; fi
.dvi.ps:
$(DVIPS) -Pps -Ptype1 -o $*.ps $*
#
# Standard targets
#
clean:
/bin/rm -f *% $(MAIN_PDF) $(MAIN_PS) $(MAIN_DVI)
squeaky:
/bin/rm -f *.log *.aux *.dvi *.blg *.toc *.bbl *.lof *.lot *.out \
$(MAIN_PS) $(MAIN_DVI) $(MAIN_PDF)
|