Added a fourth DOS-format floppy to the install disks containing os-bs
[unix-history] / etc / Makefile
CommitLineData
25767e9e
RG
1# @(#)Makefile 5.11 (Berkeley) 5/21/91
2
d1479cb8 3NOOBJ= noobj
25767e9e
RG
4
5# disktab may be wrong -- hcx9 is a tahoe, but gets its own.
6# -rw-r--r--
10e9d746
RG
7BINOWN= root
8BINGRP= wheel
9BIN1= aliases csh.cshrc csh.login csh.logout dm.conf \
ff237023 10 ftpusers gettytab group hosts host.conf hosts.equiv hosts.lpd \
8c9a737b 11 inetd.conf motd myname netstart networks phones \
10e9d746
RG
12 printcap protocols rc rc.local remote security services shells \
13 syslog.conf ttys etc.${MACHINE}/disktab rpc
25767e9e
RG
14
15# -rw-rw-rw-
16BIN2= motd
17
10e9d746
RG
18# -rwxr-xr-x root.wheel, for the new f***ing cron root.wheel
19BIN3= daily weekly monthly
20
25767e9e
RG
21MTREE= BSD.root.dist BSD.usr.dist BSD.var.dist
22NAMEDB= localhost.rev named.boot root.cache
23PCS= pcs750.bin
24WCS1= wcs fppwcs poc poc1 poc2 fppoc
25WCS2= fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual
26
f6b46f06 27# Special top level files for FreeBSD
7efea664 28COPYRIGHT= COPYRIGHT
89f66771 29FREEBSD= CONTRIB.386BSD CONTRIB.FreeBSD RELNOTES.FreeBSD ${COPYRIGHT}
ef2f6ee8
RG
30#
31# Floppy drive name and files for building FreeBSD Floppies
7efea664
RG
32FLOPPY?= fd0
33MOUNT= /mnt
34#
35MDEC= usr/mdec/bootfd usr/mdec/fdboot
36MDEC+= usr/mdec/bootsd usr/mdec/sdboot
37MDEC+= usr/mdec/bootwd usr/mdec/wdboot
38#
39KC_DIRS= dev mnt
40KC_FILES= ${COPYRIGHT}
41KC_FILES+= bin/[ bin/cp bin/echo bin/sh bin/test
42KC_FILES+= sbin/fsck sbin/halt sbin/init sbin/mount sbin/umount
43#
d1479cb8
RG
44FILESYSTEM_DIRS= bin dev etc mnt sbin usr usr/bin usr/mdec usr/sbin
45FILESYSTEM_TREES= dev
46FILESYSTEM_FILES= ${COPYRIGHT}
730f2c4e 47FILESYSTEM_FILES+= bin/[ bin/expr bin/ls bin/mkdir
d1479cb8 48FILESYSTEM_FILES+= bin/sh bin/sync bin/test
730f2c4e 49FILESYSTEM_FILES+= dev/MAKEDEV
d1479cb8
RG
50FILESYSTEM_FILES+= etc/group
51FILESYSTEM_FILES+= etc/master.passwd etc/passwd etc/pwd.db etc/spwd.db
52FILESYSTEM_FILES+= sbin/disklabel sbin/halt sbin/init
53FILESYSTEM_FILES+= sbin/mount sbin/mount_isofs sbin/mount_pcfs
54FILESYSTEM_FILES+= sbin/newfs
d1479cb8 55FILESYSTEM_FILES+= sbin/umount
730f2c4e 56FILESYSTEM_FILES+= sbin/fdisk
d1479cb8
RG
57FILESYSTEM_FILES+= usr/bin/cpio
58FILESYSTEM_FILES+= ${MDEC}
59FILESYSTEM_FILES+= usr/sbin/bad144
7efea664 60
d1479cb8
RG
61CPIO_FILES= ${COPYRIGHT}
62CPIO_FILES+= usr/bin/gunzip usr/bin/gzcat usr/bin/gzip usr/bin/zcat
ccf7b0b7 63CPIO_CPIO= bin/chmod bin/cp bin/dd bin/mv bin/pwd bin/rm bin/stty
d1479cb8
RG
64CPIO_CPIO+= etc/protocols etc/services
65CPIO_CPIO+= sbin/ifconfig sbin/fsck sbin/mknod
ccf7b0b7 66CPIO_CPIO+= sbin/route sbin/slattach
d1479cb8
RG
67CPIO_CPIO+= tmp
68CPIO_CPIO+= usr/bin/awk usr/bin/chgrp usr/bin/ftp
69CPIO_CPIO+= usr/bin/more usr/bin/tar usr/bin/tip
70CPIO_CPIO+= usr/bin/elvis usr/bin/ex usr/bin/vi usr/bin/view
d1479cb8
RG
71CPIO_CPIO+= usr/sbin/update usr/sbin/chown
72CPIO_CPIO+= var
f6b46f06 73
730f2c4e
AM
74DOS_FILES= bin/cat bin/dd bin/df bin/ed
75DOS_FILES+= usr/bin/cksum usr/bin/mt
76DOS_FILES+= sbin/mknod sbin/ping sbin/shutdown sbin/st sbin/reboot
77
3b013279 78CRYPT_LIB= lib/libcrypt
ccf7b0b7
RG
79CRYPT_SRCS= bin/ed bin/rcp
80CRYPT_SRCS+= libexec/ftpd libexec/makekey libexec/rexecd libexec/rlogind
81CRYPT_SRCS+= libexec/rshd libexec/telnetd libexec/uucpd
82CRYPT_SRCS+= usr.bin/bdes usr.bin/lock usr.bin/login usr.bin/passwd
83CRYPT_SRCS+= usr.bin/rlogin usr.bin/rsh usr.bin/su usr.bin/telnet
84CRYPT_DIRS= bin usr usr/bin usr/lib usr/libexec
3b013279 85
25767e9e
RG
86all clean cleandir depend etc install lint:
87
3b013279
RG
88crypt:
89 rm -f ${LIBCRYPT};
90 (cd ${.CURDIR}/../${CRYPT_LIB}; \
89f66771 91 ${MAKE} cleandir obj depend all install)
ccf7b0b7 92 for i in ${CRYPT_SRCS}; do \
3b013279 93 cd ${.CURDIR}/../$$i; \
89f66771 94 ${MAKE} cleandir obj depend all; \
3b013279
RG
95 done
96
97non-crypt:
98 rm -f ${LIBCRYPT}
ccf7b0b7 99 for i in ${CRYPT_SRCS}; do \
3b013279 100 cd ${.CURDIR}/../$$i; \
89f66771 101 ${MAKE} cleandir obj depend all; \
3b013279
RG
102 done
103
10e9d746 104distribution: distrib-dirs
25767e9e
RG
105 install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
106 install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc
10e9d746
RG
107 install -c -o root -g wheel -m 755 ${BIN3} ${DESTDIR}/etc
108 install -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root
40352f76 109 install -c -o root -g wheel -m 600 /dev/null ${DESTDIR}/var/cron/log
25767e9e 110 install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
d1479cb8 111 pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
25767e9e
RG
112 install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
113 MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
3b013279 114.if defined(CDROMDIST)
10e9d746 115 (cd ${DESTDIR}/dev; sh MAKEDEV all)
3b013279 116.endif
25767e9e
RG
117 (cd root; \
118 install -c -o root -g wheel -m 644 dot.cshrc \
119 ${DESTDIR}/root/.cshrc; \
120 install -c -o root -g wheel -m 644 dot.klogin \
121 ${DESTDIR}/root/.klogin; \
122 install -c -o root -g wheel -m 644 dot.login \
123 ${DESTDIR}/root/.login; \
124 install -c -o root -g wheel -m 644 dot.profile \
125 ${DESTDIR}/root/.profile; \
126 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
127 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
128 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
129 cd mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${MTREE} \
130 ${DESTDIR}/etc/mtree
131 cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
132 ${DESTDIR}/etc/namedb
133 install -c -o ${BINOWN} -g operator -m 664 /dev/null \
134 ${DESTDIR}/etc/dumpdates
10e9d746
RG
135 install -c -o nobody -g ${BINGRP} -m 664 /dev/null \
136 ${DESTDIR}/var/db/locate.database
25767e9e 137 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
10e9d746 138 ${DESTDIR}/var/log/lpd-errs
25767e9e
RG
139 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
140 ${DESTDIR}/var/log/maillog
39a69f15
RG
141 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
142 ${DESTDIR}/var/log/lastlog
25767e9e 143 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
10e9d746
RG
144 ${DESTDIR}/var/log/messages
145 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
146 ${DESTDIR}/var/log/wtmp
25767e9e
RG
147 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
148 ${DESTDIR}/var/run/utmp
149 (cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
10e9d746 150 fstab.* ${DESTDIR}/etc)
3b013279 151.if defined(NOCRYPT)
89f66771
RG
152 ${MAKE} non-crypt
153 (cd ..; NOCRYPT=nocrypt; export NOCRYPT; ${MAKE} install)
3b013279 154.else
89f66771
RG
155 ${MAKE} crypt
156 (cd ..; ${MAKE} install)
3b013279 157.endif
ef2f6ee8 158 (cd ../usr.sbin/sendmail/src; \
89f66771 159 ${MAKE} install; \
ef2f6ee8 160 cd ../cf/cf; \
89f66771 161 ${MAKE} tcpproto.cf; \
40352f76
RM
162 install -o root -g wheel -m 644 tcpproto.cf \
163 ${DESTDIR}/etc/sendmail.cf)
ef2f6ee8
RG
164 (cd ../; \
165 install -c -o root -g wheel -m 444 ${FREEBSD} ${DESTDIR}/)
89f66771 166 (cd ..; ${MAKE} mdec; )
7baf7aa0
RG
167.if ${MACHINE} == "tahoe"
168 (cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \
169 ${DESTDIR}/)
170.endif
171.if ${MACHINE} == "vax"
172 (cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
173 ${DESTDIR}/)
3d2827d3 174.endif
25767e9e
RG
175
176hcx9-distribution:
177 (cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \
178 ${DESTDIR}/)
179
d1479cb8 180kcopy-kernels: ../sys/i386/conf/GENERICAH ../sys/i386/conf/GENERICBT
2a63994c
RG
181 (cd ../sys/compile; rm -rf GENERICAH GENERICBT)
182 (cd ../sys/i386/conf; config GENERICAH; config GENERICBT)
89f66771 183 (cd ../sys/compile/GENERICAH; ${MAKE} depend; ${MAKE} all; \
2a63994c
RG
184 install -c -o root -g wheel -m 755 386bsd \
185 ${DESTDIR}/386bsd.GENERICAH)
89f66771 186 (cd ../sys/compile/GENERICBT; ${MAKE} depend; ${MAKE} all; \
2a63994c
RG
187 install -c -o root -g wheel -m 755 386bsd \
188 ${DESTDIR}/386bsd.GENERICBT)
189
d1479cb8 190kcopy-floppy:
ef2f6ee8
RG
191 disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd
192 newfs -b 4096 -c 80 -f 512 -i 16384 -m 0 -o space r${FLOPPY}a floppy5
193 mount /dev/${FLOPPY}a ${MOUNT}
7baf7aa0
RG
194 chown root.wheel ${MOUNT}/.
195 chmod 755 ${MOUNT}/.
7efea664 196 (cd ${DESTDIR}/; \
2a63994c 197 ls -d ${KC_DIRS} | cpio -pdamuv ${MOUNT})
ef2f6ee8
RG
198 (cd ${MOUNT}/dev; \
199 sh ${DESTDIR}/dev/MAKEDEV std; \
200 rm -rf fd; \
7baf7aa0 201 sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0 sd1)
7efea664 202 (cd ${DESTDIR}/; \
2a63994c 203 ls ${KC_FILES} | cpio -pdamuv ${MOUNT})
ef2f6ee8
RG
204 install -c -o root -g wheel -m 755 etc.i386/kc.profile \
205 ${MOUNT}/.profile
2a63994c 206
ccf7b0b7
RG
207kcopy-ah-floppy:
208 ${MAKE} kcopy-floppy
2a63994c
RG
209 (cd ../sys/compile/GENERICAH; \
210 install -c -o root -g wheel -m 755 386bsd ${MOUNT}/)
211 df -ik ${MOUNT}
212 umount /dev/${FLOPPY}a
213 fsck /dev/r${FLOPPY}a
ccf7b0b7 214 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/kcopy-ah-floppy \
d1479cb8 215 bs=15b count=160
ccf7b0b7
RG
216 gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy-ah-floppy \
217 >${RELEASEDIR}/floppies/kcopy-ah-floppy.gz
2a63994c 218
ccf7b0b7
RG
219kcopy-bt-floppy:
220 ${MAKE} kcopy-floppy
2a63994c 221 (cd ../sys/compile/GENERICBT; \
ef2f6ee8
RG
222 install -c -o root -g wheel -m 755 386bsd ${MOUNT}/)
223 df -ik ${MOUNT}
224 umount /dev/${FLOPPY}a
225 fsck /dev/r${FLOPPY}a
ccf7b0b7 226 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/kcopy-bt-floppy \
d1479cb8 227 bs=15b count=160
ccf7b0b7
RG
228 gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy-bt-floppy \
229 >${RELEASEDIR}/floppies/kcopy-bt-floppy.gz
ef2f6ee8 230
d1479cb8 231filesystem-floppy:
7efea664
RG
232 disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd
233 newfs -b 4096 -c 80 -f 512 -i 10240 -m 0 -o space r${FLOPPY}a floppy5
234 mount /dev/${FLOPPY}a ${MOUNT}
7baf7aa0
RG
235 chown root.wheel ${MOUNT}/.
236 chmod 755 ${MOUNT}/.
7efea664 237 (cd ${DESTDIR}/; \
d1479cb8 238 ls -d ${FILESYSTEM_DIRS} | cpio -pdamuv ${MOUNT})
7efea664
RG
239 (cd ${MOUNT}/dev; \
240 sh ${DESTDIR}/dev/MAKEDEV std; \
241 rm -rf fd; \
730f2c4e
AM
242 sh ${DESTDIR}/dev/MAKEDEV fd0 fd1 wd0 sd0 sd1
243 rm -f ${DESTDIR}/dev/rfd1[b-z] ${DESTDIR}/dev/fd1[b-z])
7efea664 244 (cd ${DESTDIR}/; \
d1479cb8 245 ls ${FILESYSTEM_FILES} | cpio -pdamuv ${MOUNT})
7efea664
RG
246 install -c -o root -g wheel -m 755 etc.i386/inst1.profile \
247 ${MOUNT}/.profile
248 install -c -o root -g wheel -m 755 etc.i386/inst1.install \
249 ${MOUNT}/install
250 (cd ${MOUNT}/; \
d1479cb8
RG
251 ls ${FILESYSTEM_FILES} >/tmp/filelist; \
252 ls -d ${FILESYSTEM_DIRS} >>/tmp/filelist; \
253 find ${FILESYSTEM_TREES} >>/tmp/filelist; \
7baf7aa0
RG
254 sort -u /tmp/filelist >filelist; \
255 rm /tmp/filelist)
7efea664
RG
256 df -ik ${MOUNT}
257 umount /dev/${FLOPPY}a
258 fsck /dev/r${FLOPPY}a
ccf7b0b7 259 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/filesystem-floppy \
d1479cb8 260 bs=15b count=160
ccf7b0b7
RG
261 gzip --no-name -9 -c ${RELEASEDIR}/floppies/filesystem-floppy \
262 >${RELEASEDIR}/floppies/filesystem-floppy.gz
7efea664 263
d1479cb8 264cpio-floppy:
7efea664
RG
265 disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd
266 newfs -b 4096 -c 80 -f 512 -i 65536 -m 0 -o space r${FLOPPY}a floppy5
267 mount /dev/${FLOPPY}a ${MOUNT}
7baf7aa0
RG
268 chown root.wheel ${MOUNT}/.
269 chmod 755 ${MOUNT}/.
7efea664 270 (cd ${DESTDIR}/; \
d1479cb8 271 ls ${CPIO_FILES} | cpio -pdamuv ${MOUNT})
7efea664 272 (cd ${DESTDIR}/; \
d1479cb8 273 find ${CPIO_CPIO} | cpio -oav | gzip -9 >${MOUNT}/inst2.cpio.gz)
7efea664
RG
274 install -c -o root -g wheel -m 755 etc.i386/inst2.profile \
275 ${MOUNT}/.profile
276 install -c -o root -g wheel -m 755 etc.i386/inst2.install \
277 ${MOUNT}/install
278 df -ik ${MOUNT}
279 umount /dev/${FLOPPY}a
280 fsck /dev/r${FLOPPY}a
ccf7b0b7 281 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/cpio-floppy \
d1479cb8 282 bs=15b count=160
ccf7b0b7
RG
283 gzip --no-name -9 -c ${RELEASEDIR}/floppies/cpio-floppy \
284 >${RELEASEDIR}/floppies/cpio-floppy.gz
285
730f2c4e
AM
286dos-floppy:
287 mount -t pcfs /dev/${FLOPPY}a ${MOUNT}
288 (cd ${DESTDIR}/; \
289 cp /sys/i386/floppy/* ${MOUNT}; \
290 cp ${DOS_FILES} ${MOUNT})
291 df -ik ${MOUNT}
292 umount /dev/${FLOPPY}a
293 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/dos-floppy \
294 bs=15b count=160
295 gzip --no-name -9 -c ${RELEASEDIR}/floppies/dos-floppy \
296 >${RELEASEDIR}/floppies/dos-floppy.gz
297
ccf7b0b7
RG
298bin-tarball:
299 (cd ${DESTDIR}; \
300 tar cf - . | gzip --no-name -9 -c | \
301 split -b 240640 - \
302 ${RELEASEDIR}/tarballs/bin.tar.gz.)
303
04a61497
RG
304src-tarball:
305 (cd ${DESTDIR}; \
306 tar --exclude usr/src/${CRYPT_LIB} -cf - usr/src | gzip --no-name -9 -c | \
307 split -b 240640 - \
308 ${RELEASEDIR}/tarballs/src.tar.gz.)
309
310ssrc-tarball:
311 (cd ${DESTDIR}; \
312 tar -cf - usr/src/${CRYPT_LIB} | gzip --no-name -9 -c | \
313 split -b 240640 - \
314 ${RELEASEDIR}/tarballs/ssrc.tar.gz.)
315
ccf7b0b7
RG
316des-tarball:
317 rm -rf ${RELEASEDIR}/tmpdes
318 mkdir ${RELEASEDIR}/tmpdes
319 for i in ${CRYPT_DIRS}; do \
320 cd ${RELEASEDIR}/tmpdes; \
321 mkdir $$i; \
322 chown ${BINOWN}.${GRPOWN} $$i; \
323 chmod 755 $$i; \
324 done
325 # This is ugly, it force installs a /usr/lib/libcrypt.a so
326 # that the other makes will be built with des.
327 #
328 (cd ${.CURDIR}/../${CRYPT_LIB}; \
329 unset NOCRYPT; \
330 DESTDIR=; export DESTDIR; \
331 ${MAKE} cleandir obj depend all install; \
332 NOMAN=noman; export NOMAN; \
333 DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
334 ${MAKE} cleandir obj depend all install)
335 for i in ${CRYPT_SRCS}; do \
336 unset NOCRYPT; \
337 DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
338 NOMAN=noman; export NOMAN; \
339 cd ${.CURDIR}/../$$i; \
340 ${MAKE} cleandir obj depend all install; \
341 done
342 (cd ${RELEASEDIR}/tmpdes; \
343 tar cf - . | gzip --no-name -9 -c | \
344 split -b 240640 - \
345 ${RELEASEDIR}/tarballs/des.tar.gz.)
346 rm -rf ${RELEASEDIR}/tmpdes
7efea664 347
10e9d746 348distrib-dirs:
40352f76 349 mtree -u -f mtree/BSD.root.dist -p ${DESTDIR}/
10e9d746
RG
350 mtree -u -f mtree/BSD.var.dist -p ${DESTDIR}/var
351 mtree -u -f mtree/BSD.usr.dist -p ${DESTDIR}/usr
ccf7b0b7
RG
352.if defined(CDROMDIST)
353 mtree -u -f mtree/BSD.local.dist -p ${DESTDIR}/usr/local
354.endif
72880036 355 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
10e9d746 356
ccf7b0b7
RG
357floppies: kcopy-ah-floppy kcopy-bt-floppy filesystem-floppy \
358 cpio-floppy
359
04a61497
RG
360release: release-dirs distribution kcopy-kernels floppies \
361 bin-tarball des-tarball
ccf7b0b7
RG
362
363release-dirs:
364 rm -rf ${RELEASEDIR}/filesystem
365 mkdir ${RELEASEDIR}/filesystem
366 chown root.wheel ${RELEASEDIR}/filesystem
367 chmod 755 ${RELEASEDIR}/filesystem
368 rm -rf ${RELEASEDIR}/tarballs
369 mkdir ${RELEASEDIR}/tarballs
370 chown root.wheel ${RELEASEDIR}/tarballs
371 chmod 755 ${RELEASEDIR}/tarballs
372 rm -rf ${RELEASEDIR}/floppies
373 mkdir ${RELEASEDIR}/floppies
374 chown root.wheel ${RELEASEDIR}/floppies
375 chmod 755 ${RELEASEDIR}/floppies
376
25767e9e 377.include <bsd.prog.mk>