-
Notifications
You must be signed in to change notification settings - Fork 49
/
Makefile
140 lines (114 loc) · 4.14 KB
/
Makefile
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
## Makefile - Makefile for the uw-wkrpt package.
## Copyright (C) 2003 Simon Law
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
# Set the package name
PACKAGE = uw-wkrpt
# Use pdfLaTeX for best results
LATEX = pdflatex
LATEX2DVI = $(LATEX) --output-format=dvi
LATEX2PDF = $(LATEX) --output-format=pdf
# MakeIndex parameters
MAKEINDEX = makeindex
GIND = gind.ist
GGLO = gglo.ist
# Bibliography
BIBTEX = bibtex
# Texi2DVI knows most about compilation
TEXI2DVI = LATEX="$(LATEX2DVI)" texi2dvi -l latex
TEXI2PDF = PDFLATEX="$(LATEX2PDF)" texi2dvi -l latex -p
# Installation
INSTALL = /usr/bin/install -c
INSTALL_DATA = $(INSTALL) -m 644
DESTDIR = .
TDSFORMAT = latex/
# Shell
RM = rm -f
TEXFILES=\
$(PACKAGE)*.aux\
$(PACKAGE)*.bbl\
$(PACKAGE)*.blg\
$(PACKAGE)*.cls\
$(PACKAGE)*.drv\
$(PACKAGE)*.dvi\
$(PACKAGE)*.glo\
$(PACKAGE)*.gls\
$(PACKAGE)*.idx\
$(PACKAGE)*.ilg\
$(PACKAGE)*.ind\
$(PACKAGE)*.lof\
$(PACKAGE)*.lot\
$(PACKAGE)*.log\
$(PACKAGE)*.pdf\
$(PACKAGE)*.sty\
$(PACKAGE)*.toc
.PHONY : all examples install uninstall dvi pdf examples-dvi examples-pdf clean
all : $(PACKAGE).cls $(PACKAGE).dvi $(PACKAGE).pdf ;
examples : examples-dvi examples-pdf ;
install : all examples
$(INSTALL) -d $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)
$(INSTALL) -d $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)
$(INSTALL) -d $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/examples
$(INSTALL_DATA) $(PACKAGE).cls $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)/
$(INSTALL_DATA) $(PACKAGE).dvi $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/
$(INSTALL_DATA) $(PACKAGE).pdf $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/
$(INSTALL_DATA) $(PACKAGE)-*.tex $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/examples
$(INSTALL_DATA) $(PACKAGE)-*.dvi $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/examples
$(INSTALL_DATA) $(PACKAGE)-*.pdf $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/examples
uninstall :
$(RM) $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)/$(PACKAGE).cls
$(RM) $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/$(PACKAGE).dvi
$(RM) $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/$(PACKAGE).pdf
$(RM) -r $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/examples
-rmdir -p $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)
-rmdir -p $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)
dvi : $(PACKAGE).dvi ;
examples-dvi : $(PACKAGE).cls \
$(PACKAGE)-cecs.dvi \
$(PACKAGE)-ece.dvi \
$(PACKAGE)-math.dvi \
$(PACKAGE)-se.dvi ;
pdf : $(PACKAGE).pdf ;
examples-pdf : $(PACKAGE).cls \
$(PACKAGE)-cecs.pdf \
$(PACKAGE)-ece.pdf \
$(PACKAGE)-math.pdf \
$(PACKAGE)-se.pdf ;
%.cls : %.ins %.dtx
$(LATEX) $<
$(PACKAGE)-%.dvi : $(PACKAGE)-%.tex $(PACKAGE).cls don-hires.eps
$(TEXI2DVI) $<
%.dvi : %.tex $(PACKAGE).cls
$(TEXI2DVI) $<
%.pdf : %.tex $(PACKAGE).cls
$(TEXI2PDF) $<
$(PACKAGE).dvi : $(PACKAGE).dtx $(PACKAGE).cls
$(TEXI2DVI) $<
$(MAKEINDEX) -s $(GIND) $(PACKAGE).idx
$(MAKEINDEX) -s $(GGLO) -o $(PACKAGE).gls $(PACKAGE).glo
$(LATEX2DVI) $<
$(LATEX2DVI) $<
$(PACKAGE).pdf : $(PACKAGE).dtx $(PACKAGE).cls
$(TEXI2PDF) $<
$(MAKEINDEX) -s $(GIND) $(PACKAGE).idx
$(MAKEINDEX) -s $(GGLO) -o $(PACKAGE).gls $(PACKAGE).glo
$(LATEX2PDF) $<
$(LATEX2PDF) $<
don-hires.eps : don-hires.pdf
pdf2ps $< $@
don-hires.pdf : ;
clean :
$(RM) $(TEXFILES) uw-ece-workreport.cls uw-ece-workreport.log don-hires.eps