blob: 92246aa35db1313df3d5f8536d8b517fddf49c85 (
plain)
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
|
# Makefile for ThuThesis
# $Id: Makefile 123 2007-11-08 13:05:49Z littleleo $
ifeq ($(MAKE),)
override MAKE=make
endif
ifeq ($(TEXI2DVI),)
override TEXI2DVI=texi2dvi
endif
ifneq ($(METHOD),ps2pdf)
ifneq ($(METHOD),dvipdfm)
override METHOD=ps2pdf
endif
endif
PACKAGE=thuthesis
SOURCES=$(PACKAGE).ins $(PACKAGE).dtx
THESISMAIN=main
THESISCONTENTS=$(THESISMAIN).tex data/*.tex
BIBFILE=ref/refs.bib
SHUJIMAIN=shuji
SHUJICONTENTS=$(SHUJIMAIN).tex
.PHONY: all clean distclean dist all thesis shuji doc cls cfg dvi ps pdf
all: cls doc thesis shuji
###### generate cls/cfg
cls: $(PACKAGE).cls
$(PACKAGE).cls: $(SOURCES)
rm -f $(PACKAGE).cls $(PACKAGE).cfg
latex $(PACKAGE).ins
###### for doc
doc: doc-pdf
doc-pdf: $(PACKAGE).pdf
doc-ps: $(PACKAGE).ps
doc-dvi: $(PACKAGE).dvi
$(PACKAGE).dvi: cls
latex $(PACKAGE).dtx
makeindex -s gind.ist -o $(PACKAGE).ind $(PACKAGE).idx
makeindex -s gglo.ist -o $(PACKAGE).gls $(PACKAGE).glo
latex $(PACKAGE).dtx
$(PACKAGE).ps: $(PACKAGE).dvi
gbk2uni $(PACKAGE)
latex $(PACKAGE).dtx
dvips -Ppdf -G0 -t letter $(PACKAGE).dvi
$(PACKAGE).pdf: $(PACKAGE).ps
ps2pdf $(PACKAGE).ps
###### for thesis
thesis: thesis-pdf
thesis-pdf: $(THESISMAIN).pdf
thesis-dvi: $(THESISMAIN).dvi
thesis-ps: $(THESISMAIN).ps
$(THESISMAIN).dvi: cls $(THESISCONTENTS) $(THESISMAIN).bbl
$(TEXI2DVI) $(THESISMAIN).tex
ifeq ($(METHOD),dvipdfm)
$(THESISMAIN).pdf: $(THESISMAIN).dvi
gbk2uni $(THESISMAIN)
latex $(THESISMAIN).tex
dvipdfm $(THESISMAIN).dvi
else
$(THESISMAIN).pdf: $(THESISMAIN).ps
ps2pdf $(THESISMAIN).ps
endif
$(THESISMAIN).ps: $(THESISMAIN).dvi
gbk2uni $(THESISMAIN)
latex $(THESISMAIN).tex
dvips -Ppdf -G0 $(THESISMAIN).dvi
$(THESISMAIN).bbl: $(BIBFILE)
$(TEXI2DVI) $(THESISMAIN).tex
-bibtex $(THESISMAIN)
###### for shuji
shuji: shuji-pdf
shuji-pdf: $(SHUJIMAIN).pdf
shuji-dvi: $(SHUJIMAIN).dvi
shuji-ps: $(SHUJIMAIN).ps
$(SHUJIMAIN).dvi: cls $(SHUJICONTENTS)
$(TEXI2DVI) $(SHUJIMAIN).tex
ifeq ($(METHOD),dvipdfm)
$(SHUJIMAIN).pdf: $(SHUJIMAIN).dvi
gbk2uni $(SHUJIMAIN)
latex $(SHUJIMAIN).tex
dvipdfmx $(SHUJIMAIN).dvi
elifeq ($(METHOD),ps2pdf)
$(SHUJIMAIN).pdf: $(SHUJIMAIN).ps
ps2pdf $(SHUJIMAIN).ps
else
$(SHUJIMAIN).pdf: cls $(SHUJICONTENTS)
pdflatex $(SHUJIMAIN)
endif
$(SHUJIMAIN).ps: $(SHUJIMAIN).dvi
gbk2uni $(SHUJIMAIN)
latex $(SHUJIMAIN).tex
dvips -Ppdf -G0 $(SHUJIMAIN).dvi
clean:
-@rm -f \
*.aux \
*.bak \
*.bbl \
*.blg \
*.cls \
*.cfg \
*.dvi \
*.glo \
*.gls \
*.idx \
*.ilg \
*.ind \
*.ist \
*.log \
*.out \
*.ps \
*.thm \
*.toc \
*.lof \
*.lot \
*.loe \
data/*.aux
distclean: clean
-@rm -f *.pdf *.tar.gz
dist:
@if [ -z "$(VERSION)" ]; then \
echo "Usage: make dist VERSION=<version#>"; \
else \
./makedist.sh $(VERSION); \
fi
|