1 |
mmeineke |
728 |
# LaTeX -*-Makefile-*- |
2 |
|
|
# |
3 |
|
|
# This first section contains macros whose values that you need to |
4 |
|
|
# fill in. |
5 |
|
|
# |
6 |
|
|
|
7 |
|
|
# MAIN_TEX: In order to build your thesis/dissertation, fill in the |
8 |
|
|
# MAIN_TEX macro with the name of your main .tex file -- the one that |
9 |
|
|
# you invoke LaTeX on. |
10 |
|
|
|
11 |
|
|
MAIN_TEX = thesis.tex |
12 |
|
|
|
13 |
|
|
# CHAP_CITE_TEX: Some departments require bibliographies for each |
14 |
|
|
# chapter. If your department only requires a single bibliography at |
15 |
|
|
# the end of the work, leave this macro blank and go on to |
16 |
|
|
# OTHER_SRC_FILES, below. |
17 |
|
|
|
18 |
|
|
# If your department does require chapter bibliographies, put the |
19 |
|
|
# filenames of your chapters in this macro (and do *not* list them |
20 |
|
|
# again in OTHER_SRC_FILES, below). You will also need to use the |
21 |
|
|
# "chapterbib" classfile -- see the sample_ndthesis.tex for an |
22 |
|
|
# example. You will also need to remove the \bibliographystyle{} and |
23 |
|
|
# \bibliography{} commands from the top-level file |
24 |
|
|
# (sample_ndthesis.tex), and append them to the end of the files |
25 |
|
|
# listed in CHAP_CITE_TEX. |
26 |
|
|
|
27 |
|
|
CHAP_CITE_TEX = |
28 |
|
|
|
29 |
|
|
# OTHER_SRC_FILES: Put in the names of all the other files that your |
30 |
|
|
# thesis depends on (e.g., other .tex files, figures, etc.) in the |
31 |
|
|
# OTHER_SRC_FILES macro. This is ensure that whenever one of the |
32 |
|
|
# "other" files changes, "make" will rebuild your paper. You should |
33 |
|
|
# *not* list any files in this macro that were already listed in |
34 |
|
|
# CHAP_CITE_TEX, above. |
35 |
|
|
|
36 |
|
|
OTHER_SRC_FILES = thesis.bbl |
37 |
|
|
|
38 |
|
|
# If you get a "command not found" for the "dvips" command, uncomment |
39 |
|
|
# one of the two commented out DVIPS macros; the first one is for running |
40 |
|
|
# on Sun (Solaris) machines, the second is for running on IBM RS/6000 |
41 |
|
|
# (AIX) machines. |
42 |
|
|
|
43 |
|
|
LATEX = latex |
44 |
|
|
DVIPS = dvips |
45 |
|
|
# For Sun Solaris machines |
46 |
|
|
#DVIPS = /afs/nd.edu/user1/lsc/Software/SUN4U_55/usr/local/bin/dvips |
47 |
|
|
# For IBM AIX machines |
48 |
|
|
#DVIPS = /afs/nd.edu/user1/lsc/Software/AIX/usr/local/bin/dvips |
49 |
|
|
|
50 |
|
|
|
51 |
|
|
######################################################################### |
52 |
|
|
# |
53 |
|
|
# You should not need to edit below this line |
54 |
|
|
# |
55 |
|
|
######################################################################### |
56 |
|
|
|
57 |
|
|
.SUFFIXES: .tex .dvi .ps .pdf .bbl |
58 |
|
|
|
59 |
|
|
CHAP_CITE = $(CHAP_CITE_TEX:.tex=) |
60 |
|
|
MAIN_DVI = $(MAIN_TEX:.tex=.dvi) |
61 |
|
|
MAIN_PS = $(MAIN_TEX:.tex=.ps) |
62 |
|
|
MAIN_PDF = $(MAIN_TEX:.tex=.pdf) |
63 |
|
|
|
64 |
|
|
# |
65 |
|
|
# Some common target names |
66 |
|
|
# Note that the default target is "ps" |
67 |
|
|
# |
68 |
|
|
|
69 |
|
|
thesis: $(MAIN_PS) |
70 |
|
|
ghostview $(MAIN_PS) |
71 |
|
|
|
72 |
|
|
ps: $(MAIN_PS) |
73 |
|
|
pdf: $(MAIN_PDF) |
74 |
|
|
|
75 |
|
|
sample: sample.ps |
76 |
|
|
ghostview sample.ps |
77 |
|
|
|
78 |
|
|
sample.dvi: sample.tex sample.bib |
79 |
|
|
|
80 |
|
|
# |
81 |
|
|
# Make the dependencies so that things build when they need to |
82 |
|
|
# |
83 |
|
|
|
84 |
|
|
$(MAIN_PS): $(MAIN_DVI) |
85 |
|
|
$(MAIN_DVI): $(MAIN_TEX) $(CITE_TEX) $(OTHER_SRC_FILES) |
86 |
|
|
$(MAIN_PDF): $(MAIN_PS) |
87 |
|
|
|
88 |
|
|
# |
89 |
|
|
# General rules |
90 |
|
|
# |
91 |
|
|
.tex.bbl: |
92 |
|
|
latex $*; bibtex $* |
93 |
|
|
|
94 |
|
|
.tex.dvi: |
95 |
|
|
@$(LATEX) $* |
96 |
|
|
@if ( grep 'LaTeX Warning: Label(s) may' $*.log > /dev/null ); \ |
97 |
|
|
then $(LATEX) $* ; else :; fi |
98 |
|
|
@ if ( grep 'Writing index file' $*.log > /dev/null ); \ |
99 |
|
|
then makeindex $* ; $(LATEX) $* ; fi |
100 |
|
|
@-if ( grep 'LaTeX Warning: Citation' $*.log > /dev/null ); then \ |
101 |
|
|
if test "$(CHAP_CITE)" ; then \ |
102 |
|
|
for file in bogus $(CHAP_CITE) ; do \ |
103 |
|
|
if test "$$file" != "bogus"; then \ |
104 |
|
|
echo "RUNNING BIBTEX ON FILE: $$file"; \ |
105 |
|
|
bibtex $$file ; \ |
106 |
|
|
fi ; \ |
107 |
|
|
done ; \ |
108 |
|
|
else \ |
109 |
|
|
echo "RUNNING BIBTEX ON FILE: $*"; \ |
110 |
|
|
bibtex $* ; \ |
111 |
|
|
fi ; \ |
112 |
|
|
$(LATEX) $* ; \ |
113 |
|
|
fi |
114 |
|
|
@if ( grep 'LaTeX Warning: Label(s) may' $*.log > /dev/null || \ |
115 |
|
|
grep 'LaTeX Warning: Citation' $*.log > /dev/null); \ |
116 |
|
|
then $(LATEX) $* ; else :; fi |
117 |
|
|
@if ( grep 'LaTeX Warning: Label(s) may' $*.log > /dev/null || \ |
118 |
|
|
grep 'LaTeX Warning: Citation' $*.log > /dev/null); \ |
119 |
|
|
then $(LATEX) $* ; else :; fi |
120 |
|
|
@if ( grep 'LaTeX Warning: Label(s) may' $*.log > /dev/null || \ |
121 |
|
|
grep 'LaTeX Warning: Citation' $*.log > /dev/null); \ |
122 |
|
|
then $(LATEX) $* ; else :; fi |
123 |
|
|
|
124 |
|
|
.dvi.ps: |
125 |
|
|
$(DVIPS) -o $*.ps $* |
126 |
|
|
|
127 |
|
|
.ps.pdf: |
128 |
|
|
distill -maxsubsetpct 99 -subsetfonts on -pairs $*.ps $*.pdf |
129 |
|
|
|
130 |
|
|
# dvips -Pamz -Pcmz -o thesis.ps thesis.dvi for type 1 fonts |
131 |
|
|
# |
132 |
|
|
# Standard targets |
133 |
|
|
# |
134 |
|
|
|
135 |
|
|
clean: |
136 |
|
|
/bin/rm -f *~ *.bak *% |
137 |
|
|
|
138 |
|
|
squeaky: |
139 |
|
|
/bin/rm -f *.log *.aux *.dvi *.blg *.toc *.bbl *.lof *.lot \ |
140 |
|
|
$(MAIN_PS) $(MAIN_DVI) $(MAIN_PDF) |
141 |
|
|
|
142 |
|
|
|
143 |
|
|
|
144 |
|
|
|
145 |
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
|
|
|
149 |
|
|
|
150 |
|
|
|