-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTapeMakefile
More file actions
326 lines (280 loc) · 9.48 KB
/
TapeMakefile
File metadata and controls
326 lines (280 loc) · 9.48 KB
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# Emacs master distribution tape Makefile
#
# NOTE: DO NOT CHANGE THIS FILE. To use a different device, blocking factor,
# or media, create a new copy of the "tape" script and change that.
#
# To check the date of this distribution:
# tape date
#
# To prepare distribution directories (once, before making tapes):
# tape prepare
#
# You will be asked about the directories in which you want to install
# binaries and libraries on the target machines; respond as it tells you.
# After you answer the questions, the script will build the source and
# binary distributions in the background. To see its progress, type
# 'tail -f bingen.LOG'.
#
# After the distribution has been generated, you can use the tape script
# to write the various sorts of distributions. To make Emacs source,
# binary, and manual distribution tapes, respectively:
#
# tape src # after mounting each tape
# tape bin # after mounting each tape
# tape man # after mounting each tape
#
# tape cmacs # cmacs source
# tape viplus # viplus source
# tape adamacs # adamacs source
# tape cmacsbin # cmacs binary
# tape viplusbin # viplus binary
# tape adamacsbin # adamacs binary
#---- may need to change these when moving to a new system
# NOTE: You should try to get by without changing this file at all;
# see if you can manage to change only the "tape" script.
# type of tape made by 'tape' with no args
# set to src for source, bin for binary, man for manual
first: src
NINEDEV = /dev/rmt8
NINEBLK = 20
STRMDEV = /dev/rst0
STRMBLK = 126
# set MEDIA to nine, strm, or disk -- no trailing space or comment!
MEDIA = nine
# WRITExxxx will be invoked with a list of file names as arguments
#V = v
WRITEDISK = tar c$(V)
WRITESTRM = tar c$(V)fb $(STRMDEV) $(STRMBLK)
WRITENINE = tar c$(V)fb $(NINEDEV) $(NINEBLK)
# blocks per hi-density and lo-density floppy
HIBLOCKS = 1200
LOBLOCKS = 360
#---- needn't change anything below this line
# binary tapes will contain BINDIRS, relative to BINROOT
BINROOT = local
BINDIRS = .
BINDIR = $(BINROOT)/bin
LIBDIR = $(BINROOT)/lib
EBINDIR = $(LIBDIR)/emacs
MANDIR = $(EBINDIR)/man
# 'tape bingen' uses INSTALL as the dependency in src to install
BINONLYINSTALL = install
SRCBININSTALL = installem installhl
# Uncomment the following to include the c2ps demo directory in SRCFILES.
#C2PS = c2ps
## Lists of files relative to top level directory
# MANFILES omits man/D.refcard, man/D.misc, and man/db/*.{dat,dir,pag}
MEDIAFILES = README* media TapeMakefile tape config einstall print \
strip merge
SRCFILES = $(MEDIAFILES) src maclib ps databases doc demo $(C2PS) \
update \
man/*.1 man/README man/Makefile \
public
MANFILES = man/tmac man/D.usersguide man/D.refman man/src.util \
man/maclib man/bin
BINFILES = local
## dependencies for making media
#
src: $(MEDIA)src
bin: $(MEDIA)bin
man: $(MEDIA)man
srcbin: $(MEDIA)srcbin
ninesrc:
$(WRITENINE) $(SRCFILES) $(MANFILES)
ninebin:
cd $(BINROOT); $(WRITENINE) $(BINDIRS)
nineman:
$(WRITENINE) $(MANFILES)
ninesrcbin:
$(WRITENINE) $(BINFILES) $(SRCFILES) $(MANFILES)
strmsrc:
$(WRITESTRM) $(SRCFILES) $(MANFILES)
strmbin:
cd $(BINROOT); $(WRITESTRM) $(BINDIRS)
strmman:
$(WRITESTRM) $(MANFILES)
strmsrcbin:
$(WRITESTRM) $(BINFILES) $(SRCFILES) $(MANFILES)
disksrc:
$(WRITEDISK) $(SRCFILES)
diskbin:
cd $(BINROOT); $(WRITEDISK) $(BINDIRS)
diskman:
$(WRITEDISK) $(MANFILES)
disksrcbin:
$(WRITEDISK) $(SRCFILES) $(BINFILES)
######################################################################
# Addon products
#
# directory to which archive will be made relative
#
CMACSDIR = cmacs
ADAMACSDIR = adamacs
VIPLUSDIR = viplus
CMACSBINROOT = $(CMACSDIR)/$(BINROOT)
VIPLUSBINROOT = $(VIPLUSDIR)/$(BINROOT)
ADAMACSBINROOT = $(ADAMACSDIR)/$(BINROOT)
# files within the addon directory to be placed in the archive.
#
CMACSFILES = README* config src maclib databases doc man
VIPLUSFILES = README* config maclib doc man
ADAMACSFILES = README* config src maclib databases doc man
cmacs: $(MEDIA)cmacs
viplus: $(MEDIA)viplus
adamacs: $(MEDIA)adamacs
cmacsbin: $(MEDIA)cmacsbin
viplusbin: $(MEDIA)viplusbin
adamacsbin: $(MEDIA)adamacsbin
ninecmacs:
cd $(CMACSDIR); $(WRITENINE) $(CMACSFILES)
nineviplus:
cd $(VIPLUSDIR); $(WRITENINE) $(VIPLUSFILES)
nineadamacs:
cd $(ADAMACSDIR); $(WRITENINE) $(ADAMACSFILES)
strmcmacs:
cd $(CMACSDIR); $(WRITESTRM) $(CMACSFILES)
strmviplus:
cd $(VIPLUSDIR); $(WRITESTRM) $(VIPLUSFILES)
strmadamacs:
cd $(ADAMACSDIR); $(WRITESTRM) $(ADAMACSFILES)
diskcmacs:
cd $(CMACSDIR); $(WRITEDISK) $(CMACSFILES)
diskviplus:
cd $(VIPLUSDIR); $(WRITEDISK) $(VIPLUSFILES)
diskadamacs:
cd $(ADAMACSDIR); $(WRITEDISK) $(ADAMACSFILES)
# Cmacs, Adamacs and VIplus Binaries
#
ninecmacsbin:
cd $(CMACSBINROOT); $(WRITENINE) $(BINDIRS)
nineviplusbin:
cd $(VIPLUSBINROOT); $(WRITENINE) $(BINDIRS)
nineadamacsbin:
cd $(ADAMACSBINROOT); $(WRITENINE) $(BINDIRS)
strmcmacsbin:
cd $(CMACSBINROOT); $(WRITESTRM) $(BINDIRS)
strmviplusbin:
cd $(VIPLUSBINROOT); $(WRITESTRM) $(BINDIRS)
strmadamacsbin:
cd $(ADAMACSBINROOT); $(WRITESTRM) $(BINDIRS)
diskcmacsbin:
cd $(CMACSBINROOT); $(WRITEDISK) $(BINDIRS)
diskviplusbin:
cd $(VIPLUSBINROOT); $(WRITEDISK) $(BINDIRS)
diskadamacsbin:
cd $(ADAMACSBINROOT); $(WRITEDISK) $(BINDIRS)
######################################################################
## Maintenance dependencies
#
clean: cleansrc cleanturds
cleansrc:
cd src; make cleanall
cleanturds:
find . \( -name '*.BAK' -o -name '*.CKP' -o -name '.emacs_[0-9]*' \) \
-print -exec rm -f {} \;
date version:
@date=`grep 'centldate\[' src/version.c |sed 's/^.*"\([^"]*\)".*$$/\1/'`;\
vers=`grep 'centlvers\[' src/version.c |sed 's/^.*"\([^"]*\)".*$$/\1/'`;\
echo "Emacs $$vers ($$date)"
# NOTE: the following assume a filesystem block size of 1 KB
binsize:
@cd $(BINROOT); du -s $(BINDIRS) |\
awk '{s += $$1} END {print "Total binary tape size (blocks) = " s;\
printf " %d high-density, %d lo-density\n",\
s/$(HIBLOCKS), s/$(LOBLOCKS)}'
srcsize:
@du -s $(SRCFILES) |\
awk '{s += $$1} END {print "Total source tape size (blocks) = " s;\
printf " %d high-density, %d lo-density\n",\
s/$(HIBLOCKS), s/$(LOBLOCKS)}'
mansize:
@du -s $(MANFILES) |\
awk '{s += $$1} END {print "Total manual tape size (blocks) = " s;\
printf " %d high-density, %d lo-density\n",\
s/$(HIBLOCKS), s/$(LOBLOCKS)}'
srcbinsize:
@du -s $(SRCFILES) $(BINFILES) |\
awk '{s += $$1} END {print "Total source/bin tape size (blocks) = " s;\
printf " %d high-density, %d lo-density\n",\
s/$(HIBLOCKS), s/$(LOBLOCKS)}'
list:
ls -lR $(SRCFILES) > Packing.List
SHELL = /bin/sh
# Generation of binaries
#
BINGENPARMS = LIBDIR=$$wd/$(LIBDIR) BINDIR=$$wd/$(BINDIR) \
MANDIR=$$wd/$(MANDIR) BINMOVE=ln LIBMOVE=ln
# generate binaries by installing all but the machine-specific support files
# into subdirectories of the "local" directory from which binary-only
# distributions will be made.
#
binonlygen: distdirs
(cd src; make unupdate)
wd=`pwd` cd src; make $(MFLAGS) $(BINONLYINSTALL) \
$(BINGENPARMS) INSTALLMACH=
wd=`pwd` cd config; $(BINGENPARMS) ./bingen.sh
# create the bin directory which is placed alongside the sources on
# "srcbin" distributions. This contains only binaries of emacs and the
# helpers.
#
srcbingen:
(cd src; make unupdate)
wd=`pwd` cd src; make $(MFLAGS) $(SRCBININSTALL) \
$(BINGENPARMS)
# install binaries for the addon products. CROCK: We set path here to
# include src/D.helpers, where we hope that the dbbuild binary now lives.
# Otherwise, the 'make installdb' done by the installation will try to find it
# in the addon's binary directory; since dbbuild isn't part of the addon, it
# won't find it there. An alternative might be to have each of the addons
# list dbbuild as part of their binary distribution...
#
cmacsbingen:
(cd src; make unupdate)
@-for j in $(CMACSDIR) $(CMACSBINROOT) ;\
do if [ ! -d $$j ] ;\
then echo "Creating directory $$j" ;\
mkdir $$j; else true;fi ;\
done
(wd=`pwd`/$(CMACSDIR) PATH=`pwd`/src/D.helpers:$PATH \
cd config; ./addcmacs.sh install $(BINGENPARMS))
viplusbingen:
(cd src; make unupdate)
@-for j in $(VIPLUSDIR) $(VIPLUSBINROOT) ;\
do if [ ! -d $$j ] ;\
then echo "Creating directory $$j" ;\
mkdir $$j; else true;fi ;\
done
(wd=`pwd`/$(VIPLUSDIR) PATH=`pwd`/src/D.helpers:$PATH \
cd config; ./addviplus.sh install $(BINGENPARMS))
adamacsbingen:
(cd src; make unupdate)
@-for j in $(ADAMACSDIR) $(ADAMACSBINROOT) ;\
do if [ ! -d $$j ] ;\
then echo "Creating directory $$j" ;\
mkdir $$j; else true;fi ;\
done
(wd=`pwd`/$(ADAMACSDIR) PATH=`pwd`/src/D.helpers:$PATH \
cd config; ./addadamacs.sh install $(BINGENPARMS))
bingen: binonlygen srcbingen cmacsbingen adamacsbingen #viplusbingen
prepare:
./einstall interview config
./merge && \
((./tape bingen && ./tape clean && ./strip)>bingen.LOG 2>&1&)
@echo "Generating binary distribution in background."
@echo "Type 'tail -f bingen.LOG' to watch its progress."
unupdate:
cd src; make unupdate
# This is probably unnecessary now that the main makefile creates the
# destination directories.
distdirs:
@-for j in $(BINROOT) ;\
do if [ ! -d $$j ] ;\
then echo "Creating directory $$j" ;\
mkdir $$j ; true ;\
else true ;\
fi ;\
done
DESTDIR = /unipress/usr/emacs/V2.20 # make copytree moves files here
# Note: the pipe of tars may not work on system V
copytree:
tar cf - $(SRCFILES) | (cd $(DESTDIR); tar xf -)