summaryrefslogtreecommitdiff
path: root/info/digests/tugboat/biblio/makefile.unx
blob: 9af065e5b7d956071360060b5343f6b57fcea6dd (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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# ======================================================================
# Makefile for files in ~beebe/tex/tugboat
# This constructs the tugboat.bib file from the tb*.cnt files using
# the awk program tugboat.awk, and then produces complete test
# bibliographies in alpha and unsrt form.  A kwic index of the
# bibliography is also produced:
#
# Targets:
# all		tugbib + tugbib2 + kwic
# FTP		install public files in anonymous ftp directory
# tugbib	bibliography in alpha order
# tugbib2	bibliography in unsrt order
# kwic		keyword-in-context index to tugboat.bib.  Must be printed
#		in landscape orientation.
# SYS		install public files in system TeX directory tree
# clean		remove files that can be recreated by running make again
# [17-May-1995]
# ======================================================================

AWK                     = nawk

# If you don't have bibclean, use cat instead
BIBCLEAN                = bibclean

# You need an enlarged version of BibTeX for this job
BIBTEX                  = bibtex

CHECKSUM                = checksum

CP                      = /bin/cp -p

DETEX                   = detex

DEV                     = alw

FTPDIR                  = /usr/spool/ftp/pub/tex/pub/tugboat
FTPDIR                  = /u/ftp/pub/tex/pub/tugboat

FTPFILES                = kwic-bib.awk kwic.dvi \
			  kwic.ltx landscape.sty ptx.sed \
			  $(TUGCONTENTS) tbcont.def tbcv05.tex \
			  tbcv10.tex tugbib.bbl tugbib.dvi tugbib.ltx \
			  tugbib2.bbl tugbib2.dvi tugbib2.ltx \
			  tugboat.awk tugboat.bib tugboat.def \
			  tugboat.kwic tugboat.ptx tugboat.ver

# We need a BIGG version of LaTeX to handle this big bibliography
LATEX                   = latex

MV			= mv

NAWK			= nawk

PTX			= /bin/ptx
PTX			= /usr/local/bin/ptx -G # GNU ptx in ptx-compatibility mode

RM                      = rm -f

SED                     = /bin/sed

SHELL                   = /bin/sh

SYSDIR                  = /usr/local/lib/tex/tugboat

SYSFILES                = Makefile kwic-bib.awk kwic.aux kwic.log \
			  kwic.ltx landscape.sty ptx.sed \
			  tables/bibxrf.awk tables/super.ltx \
			  tables/tab.ltx tables/test.ltx \
			  tables/tugboat.alf tables/tugboat.def \
			  tables/tugboat.num tables/tugboat.xrf \
			  $(TUGCONTENTS) tbcont.def tbcv05.tex \
			  tbcv10.tex tugbib.blg tugbib.ltx tugbib2.blg \
			  tugbib2.ltx tugboat.awk tugboat.bib \
			  tugboat.def tugboat.kwic tugboat.ptx

TEX                     = tex

TUGCONTENTS             = tb0180.cnt tb0281.cnt tb0382.cnt tb0483.cnt \
			  tb0584.cnt tb0685.cnt tb0786.cnt tb0887.cnt \
			  tb0988.cnt tb1089.cnt tb1190.cnt tb1291.cnt \
			  tb1392.cnt tb1493.cnt tb1594.cnt

# For temporary debugging
# TUGCONTENTS		= tb0988.cnt

#=======================================================================

.SUFFIXES:

.SUFFIXES:	.aux .dvi-$(DEV) .dvi .spell .ltx .tex .kwic .ptx .bbl .bib

.bib.bbl:
	-$(NBIBTEX) $*

# DECstation ULTRIX gets error return from ptx, so just ignore it
.bib.ptx:
	-nawk -f kwic-bib.awk <$< | $(PTX) -r -f >$@

.dvi.dvi-$(DEV):
	dvi$(DEV) -m$(MAG) $<
	cp $*.dvi-$(DEV) /$(DEV)
	rm -f $@

.ltx.aux .ltx.dvi:
	-$(LATEX) $<

.ltx.spell:
	$(DETEX) $< | spell >$@

.ptx.kwic:
	$(SED) -f ptx.sed <$< >$@

.tex.aux .tex.dvi:
	$(TEX) $<

.tex.spell:
	$(DETEX) $< | spell >$@

#=======================================================================

all:	tugbib tugbib2 kwic

FTP:	$(FTPFILES)
	$(CP) $? $(FTPDIR)
	date >FTP

kwic:	kwic.dvi

kwic.dvi:	tugboat.kwic

SYS:	$(SYSFILES)
	$(CP) $? $(SYSDIR)
	date >SYS

tugboat.kwic:	tugboat.ptx ptx.sed

tugboat.ptx:	tugboat.bib kwic-bib.awk

tugbib:	tugbib.dvi

# tugbib is in alpha order; this is preferable to plain (which gives
# the same reference order) so we can test the correctness of alphanumeric
# bibliography labels.
tugbib.dvi:	tugbib.ltx tugboat.bib
	-$(RM) tugbib.bbl
	-$(RM) tugbib.aux
	-$(LATEX) tugbib.ltx
	-$(BIBTEX) tugbib
	-$(LATEX) tugbib.ltx
	-$(LATEX) tugbib.ltx

tugbib.bbl:	tugbib.aux tugboat.bib
	$(BIBTEX) tugbib

tugbib2:	tugbib2.dvi

# tugbib2 is in unsrt order for checking the bibliography against the
# original TUGboat tables of contents
tugbib2.dvi:	tugbib2.ltx tugboat.bib
	-$(RM) tugbib2.bbl
	-$(RM) tugbib2.aux
	-$(LATEX) tugbib2.ltx
	-$(BIBTEX) tugbib2
	-$(LATEX) tugbib2.ltx
	-$(LATEX) tugbib2.ltx

tugbib2.bbl:	tugbib2.aux tugboat.bib
	-$(BIBTEX) tugbib2

# NB: We store the pipeline output in a temporary file, and only if
# the steps are successful do we rename it to the final target name.
# That way, a failure won't produce an incorrect target file.
tugboat.bib:	$(TUGCONTENTS) tugboat.awk Makefile tugboat.ver
	$(AWK) "BEGIN {print `cat tugboat.ver` + 0.01}" /dev/null >tugboat.tmp
	$(MV) tugboat.tmp tugboat.ver
	$(AWK) -f tugboat.awk $(TUGCONTENTS) | \
		$(BIBCLEAN) | \
		$(SED) -e '1r tugboat.hdr' | \
		$(SED) -e s/"@@TIME@@"/"`date +%T\ %Z`"/ \
			-e s/"@@DATE@@"/"`date +%d\ %B\ %Y`"/ \
			-e s/"@@VERSION@@"/"`cat tugboat.ver`"/ | \
		$(CHECKSUM) >tugboat.tmp
	$(MV) tugboat.tmp tugboat.bib

clean:
	-$(RM) *.aux
	-$(RM) *.blg
	-$(RM) *.bbl
	-$(RM) *.dvi*
	-$(RM) *.log
	-$(RM) *.lst
	-$(RM) *.ptx
	-$(RM) *.kwic
	-$(RM) *~*
	-$(RM) tugboat.tmp

clobber:	clean
	-$(RM) tugboat.bib