Makefile revision 1194
137Srgrimes#	@(#)Makefile	5.11 (Berkeley) 5/21/91
237Srgrimes
3358SrgrimesNOOBJ=	noobj
437Srgrimes
537Srgrimes# disktab may be wrong -- hcx9 is a tahoe, but gets its own.
637Srgrimes# -rw-r--r--
7147SrgrimesBINOWN= root
8147SrgrimesBINGRP= wheel
9147SrgrimesBIN1=	aliases csh.cshrc csh.login csh.logout dm.conf \
10207Snate	ftpusers gettytab group hosts host.conf hosts.equiv hosts.lpd \
11377Srgrimes	inetd.conf motd myname netstart networks phones \
12147Srgrimes	printcap protocols rc rc.local remote security services shells \
13147Srgrimes	syslog.conf ttys etc.${MACHINE}/disktab rpc
1437Srgrimes
1537Srgrimes# -rw-rw-rw-
1637SrgrimesBIN2=	motd
1737Srgrimes
18147Srgrimes# -rwxr-xr-x root.wheel, for the new f***ing cron root.wheel
19147SrgrimesBIN3=	daily weekly monthly
20147Srgrimes
21491SrgrimesMTREE=	BSD.local.dist BSD.root.dist BSD.usr.dist BSD.var.dist
2237SrgrimesNAMEDB=	localhost.rev named.boot root.cache
2337SrgrimesPCS=	pcs750.bin
2437SrgrimesWCS1=	wcs fppwcs poc poc1 poc2 fppoc
2537SrgrimesWCS2=	fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual
2637Srgrimes
27263Srgrimes# Special top level files for FreeBSD
281130SrgrimesCOPYRIGHT=	COPYRIGHT.386BSD COPYRIGHT.FreeBSD
29993SrgrimesFREEBSD=	CONTRIB.386BSD CONTRIB.FreeBSD
301126SrgrimesFREEBSD+=	MIRROR.SITES PERSONAL.ACKS RELNOTES.FreeBSD SUPPORT.TXT
31993SrgrimesFREEBSD+=	${COPYRIGHT}
32277Srgrimes#
33277Srgrimes# Floppy drive name and files for building FreeBSD Floppies
34284SrgrimesFLOPPY?=	fd0
35463SrgrimesMOUNT?=		/mnt
36568SrgrimesFLOPPY_TYPE?=	floppy5
37284Srgrimes#
38284SrgrimesMDEC=		usr/mdec/bootfd usr/mdec/fdboot
39284SrgrimesMDEC+=		usr/mdec/bootsd usr/mdec/sdboot
40284SrgrimesMDEC+=		usr/mdec/bootwd usr/mdec/wdboot
41284Srgrimes#
421194SrgrimesKC_DIRS=	dev mnt bin sbin
43284SrgrimesKC_FILES=	${COPYRIGHT}
441194SrgrimesKC_FILES+=	bin/sh					# XXX Crunch is broken!
451194SrgrimesKC_LINKS=	bin/[ bin/cp bin/echo bin/test
461194SrgrimesKC_LINKS+=	sbin/fsck sbin/halt sbin/init sbin/mount sbin/umount
47284Srgrimes#
481194SrgrimesFILESYSTEM_DIRS=	bin dev etc mnt proc sbin usr usr/bin usr/mdec usr/sbin
49358SrgrimesFILESYSTEM_TREES=	dev
50358SrgrimesFILESYSTEM_FILES=	${COPYRIGHT}
511194SrgrimesFILESYSTEM_FILES+=	bin/sh				# XXX Crunch is broken!
52412SalmFILESYSTEM_FILES+=	dev/MAKEDEV
53358SrgrimesFILESYSTEM_FILES+=	etc/group
54452SrgrimesFILESYSTEM_FILES+=	etc/master.passwd etc/passwd etc/pwd.db
55358SrgrimesFILESYSTEM_FILES+=	${MDEC}
561194SrgrimesFILESYSTEM_LINKS=	bin/[ bin/expr bin/ls bin/mkdir bin/rm
571194SrgrimesFILESYSTEM_LINKS+=	bin/sync bin/test
581194SrgrimesFILESYSTEM_LINKS+=	sbin/disklabel sbin/fdisk sbin/halt sbin/init
591194SrgrimesFILESYSTEM_LINKS+=	sbin/mount sbin/mount_pcfs
601194SrgrimesFILESYSTEM_LINKS+=	sbin/newfs
611194SrgrimesFILESYSTEM_LINKS+=	sbin/umount
621194SrgrimesFILESYSTEM_LINKS+=	usr/bin/cpio
631194SrgrimesFILESYSTEM_LINKS+=	usr/bin/gunzip usr/bin/gzcat usr/bin/gzip usr/bin/zcat
641194SrgrimesFILESYSTEM_LINKS+=	usr/sbin/bad144
651194SrgrimesFILESYSTEM_CPIO=	.profile
661194SrgrimesFILESYSTEM_CPIO+=	root/.profile
671194SrgrimesFILESYSTEM_CPIO+=	bin/[
681194SrgrimesFILESYSTEM_CPIO+=	bin/chmod bin/cat bin/cp bin/df bin/expr bin/ls
691194SrgrimesFILESYSTEM_CPIO+=	bin/ln bin/mkdir bin/mv bin/rm bin/sync
701194SrgrimesFILESYSTEM_CPIO+=	bin/test
711194SrgrimesFILESYSTEM_CPIO+=	etc/spwd.db
721194SrgrimesFILESYSTEM_CPIO+=	sbin/disklabel sbin/fdisk sbin/halt sbin/init
731194SrgrimesFILESYSTEM_CPIO+=	sbin/mount sbin/mount_pcfs
741194SrgrimesFILESYSTEM_CPIO+=	sbin/newfs
751194SrgrimesFILESYSTEM_CPIO+=	sbin/umount
76263Srgrimes
77358SrgrimesCPIO_FILES=	${COPYRIGHT}
781194SrgrimesCPIO_CPIO=	bin/dd bin/ps bin/pwd bin/stty
791194SrgrimesCPIO_CPIO+=	etc/protocols etc/remote etc/services
801194SrgrimesCPIO_CPIO+=	etc/termcap
811194SrgrimesCPIO_CPIO+=	sbin/dmesg
82452SrgrimesCPIO_CPIO+=	sbin/ifconfig sbin/fsck sbin/mknod sbin/mount_isofs
831194SrgrimesCPIO_CPIO+=	sbin/mount_procfs
84452SrgrimesCPIO_CPIO+=	sbin/reboot sbin/route sbin/slattach
851194SrgrimesCPIO_CPIO+=	usr/bin/awk usr/bin/chgrp usr/bin/cpio usr/bin/ex usr/bin/ftp
861194SrgrimesCPIO_CPIO+=	usr/bin/gunzip usr/bin/gzcat usr/bin/gzip
87358SrgrimesCPIO_CPIO+=	usr/bin/more usr/bin/tar usr/bin/tip
881194SrgrimesCPIO_CPIO+=	usr/bin/vi usr/bin/view usr/bin/zcat
891194SrgrimesCPIO_CPIO+=	usr/libexec/ld.so
901194SrgrimesCPIO_CPIO+=	usr/lib/libc.so.1.0
911194SrgrimesCPIO_CPIO+=	usr/lib/libcurses.so.1.0
921194SrgrimesCPIO_CPIO+=	usr/lib/libgcc.so.1.0
931194SrgrimesCPIO_CPIO+=	usr/lib/libm.so.1.0
941194SrgrimesCPIO_CPIO+=	usr/lib/libtermlib.so.1.0
951194SrgrimesCPIO_CPIO+=	usr/lib/libtermcap.so.1.0
961194SrgrimesCPIO_CPIO+=	usr/lib/libutil.so.1.0
971194SrgrimesCPIO_CPIO+=	usr/sbin/bad144 usr/sbin/chown
981194SrgrimesCPIO_CPIO+=	usr/share/misc/termcap
99813SrgrimesCPIO_CPIO_DIRS=	tmp var var/tmp var/run var/spool var/spool/lock
100284Srgrimes
101347SrgrimesCRYPT_LIB=	lib/libcrypt
102372SrgrimesCRYPT_SRCS=	bin/ed bin/rcp
103372SrgrimesCRYPT_SRCS+=	libexec/ftpd libexec/makekey libexec/rexecd libexec/rlogind
104372SrgrimesCRYPT_SRCS+=	libexec/rshd libexec/telnetd libexec/uucpd
1051126SrgrimesCRYPT_SRCS+=	sbin/init.bsdi
106372SrgrimesCRYPT_SRCS+=	usr.bin/bdes usr.bin/lock usr.bin/login usr.bin/passwd
107372SrgrimesCRYPT_SRCS+=	usr.bin/rlogin usr.bin/rsh usr.bin/su usr.bin/telnet
1081126SrgrimesCRYPT_DIRS=	bin sbin usr usr/bin usr/lib usr/libexec 
109347Srgrimes
11037Srgrimesall clean cleandir depend etc install lint:
11137Srgrimes
112347Srgrimescrypt:
113347Srgrimes	rm -f ${LIBCRYPT};
114347Srgrimes	(cd ${.CURDIR}/../${CRYPT_LIB}; \
115355Srgrimes		${MAKE} cleandir obj depend all install)
116372Srgrimes	for i in ${CRYPT_SRCS}; do \
117347Srgrimes		cd ${.CURDIR}/../$$i; \
118355Srgrimes		${MAKE} cleandir obj depend all; \
119347Srgrimes	done
120347Srgrimes	
121347Srgrimesnon-crypt:
122347Srgrimes	rm -f ${LIBCRYPT}
123372Srgrimes	for i in ${CRYPT_SRCS}; do \
124347Srgrimes		cd ${.CURDIR}/../$$i; \
125355Srgrimes		${MAKE} cleandir obj depend all; \
126347Srgrimes	done
127347Srgrimes	
128147Srgrimesdistribution: distrib-dirs
12937Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
13037Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc
131147Srgrimes	install -c -o root -g wheel -m 755 ${BIN3} ${DESTDIR}/etc
1321014Snate	install -c -o root -g wheel -m 644 crontab ${DESTDIR}/etc
133238Sroot	install -c -o root -g wheel -m 600 /dev/null ${DESTDIR}/var/cron/log
13437Srgrimes	install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
135358Srgrimes	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
13637Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
13737Srgrimes	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
138347Srgrimes.if defined(CDROMDIST)
139147Srgrimes	(cd ${DESTDIR}/dev; sh MAKEDEV all)
140347Srgrimes.endif
14137Srgrimes	(cd root; \
14237Srgrimes		install -c -o root -g wheel -m 644 dot.cshrc \
14337Srgrimes		    ${DESTDIR}/root/.cshrc; \
14437Srgrimes		install -c -o root -g wheel -m 644 dot.klogin \
14537Srgrimes		    ${DESTDIR}/root/.klogin; \
14637Srgrimes		install -c -o root -g wheel -m 644 dot.login \
14737Srgrimes		    ${DESTDIR}/root/.login; \
14837Srgrimes		install -c -o root -g wheel -m 644 dot.profile \
14937Srgrimes		    ${DESTDIR}/root/.profile; \
15037Srgrimes		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
15137Srgrimes		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
15237Srgrimes		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
15337Srgrimes	cd mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${MTREE} \
15437Srgrimes	    ${DESTDIR}/etc/mtree
15537Srgrimes	cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
15637Srgrimes	    ${DESTDIR}/etc/namedb
15737Srgrimes	install -c -o ${BINOWN} -g operator -m 664 /dev/null \
15837Srgrimes	    ${DESTDIR}/etc/dumpdates
159147Srgrimes	install -c -o nobody -g ${BINGRP} -m 664 /dev/null \
160147Srgrimes	    ${DESTDIR}/var/db/locate.database
16137Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
162147Srgrimes	    ${DESTDIR}/var/log/lpd-errs
16337Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
16437Srgrimes	    ${DESTDIR}/var/log/maillog
16537Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
166288Srgrimes	    ${DESTDIR}/var/log/lastlog
167288Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
168147Srgrimes	    ${DESTDIR}/var/log/messages
16937Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
170147Srgrimes	    ${DESTDIR}/var/log/wtmp
171147Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
17237Srgrimes	    ${DESTDIR}/var/run/utmp
17337Srgrimes	(cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
174147Srgrimes	    fstab.* ${DESTDIR}/etc)
175347Srgrimes.if defined(NOCRYPT)
176355Srgrimes	${MAKE} non-crypt
177355Srgrimes	(cd ..; NOCRYPT=nocrypt; export NOCRYPT; ${MAKE} install)
178347Srgrimes.else
179355Srgrimes	${MAKE} crypt
180355Srgrimes	(cd ..; ${MAKE} install)
181347Srgrimes.endif
182277Srgrimes	(cd ../usr.sbin/sendmail/src; \
183355Srgrimes	    ${MAKE} install; \
184277Srgrimes	 cd ../cf/cf; \
1851126Srgrimes	    ${MAKE} obj; \
1861126Srgrimes	    ${MAKE} freefall.cf; \
1871133Srgrimes	    install -o root -g wheel -m 644 obj/freefall.cf \
188238Sroot	        ${DESTDIR}/etc/sendmail.cf)
189277Srgrimes	(cd ../; \
190277Srgrimes	    install -c -o root -g wheel -m 444 ${FREEBSD} ${DESTDIR}/)
191355Srgrimes	(cd ..; ${MAKE} mdec; )
192644Srgrimes	(cd ../share/man; ${MAKE} makedb; )
193333Srgrimes.if ${MACHINE} == "tahoe"
194333Srgrimes	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \
195333Srgrimes	    ${DESTDIR}/)
196168Srgrimes.endif
197333Srgrimes.if ${MACHINE} == "vax"
198333Srgrimes	(cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
199333Srgrimes	    ${DESTDIR}/)
200333Srgrimes.endif
20137Srgrimes
20237Srgrimeshcx9-distribution:
20337Srgrimes	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \
20437Srgrimes	    ${DESTDIR}/)
20537Srgrimes
206358Srgrimeskcopy-kernels: ../sys/i386/conf/GENERICAH ../sys/i386/conf/GENERICBT
207320Srgrimes	(cd ../sys/compile; rm -rf GENERICAH GENERICBT)
208320Srgrimes	(cd ../sys/i386/conf; config GENERICAH; config GENERICBT)
209355Srgrimes	(cd ../sys/compile/GENERICAH; ${MAKE} depend; ${MAKE} all; \
210320Srgrimes	    install -c -o root -g wheel -m 755 386bsd \
211320Srgrimes	        ${DESTDIR}/386bsd.GENERICAH)
212355Srgrimes	(cd ../sys/compile/GENERICBT; ${MAKE} depend; ${MAKE} all; \
213320Srgrimes	    install -c -o root -g wheel -m 755 386bsd \
214320Srgrimes	        ${DESTDIR}/386bsd.GENERICBT)
215320Srgrimes
216358Srgrimeskcopy-floppy:
217568Srgrimes	disklabel -w -r ${FLOPPY} ${FLOPPY_TYPE} \
218568Srgrimes		/usr/mdec/fdboot /usr/mdec/bootfd
219568Srgrimes	newfs -b 4096 -c 80 -f 512 -i 16384 -m 0 -o space \
2201027Sache		r${FLOPPY} ${FLOPPY_TYPE}
2211027Sache	mount /dev/${FLOPPY} ${MOUNT}
222333Srgrimes	chown root.wheel ${MOUNT}/.
223333Srgrimes	chmod 755 ${MOUNT}/.
224284Srgrimes	(cd ${DESTDIR}/; \
225320Srgrimes	    ls -d ${KC_DIRS} | cpio -pdamuv ${MOUNT})
226277Srgrimes	(cd ${MOUNT}/dev; \
227277Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV std; \
228277Srgrimes	    rm -rf fd; \
2291126Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0 sd1; \
2301126Srgrimes	    rm -rf fd0?* rfd0?*;)
231284Srgrimes	(cd ${DESTDIR}/; \
232320Srgrimes	    ls ${KC_FILES} | cpio -pdamuv ${MOUNT})
233277Srgrimes	install -c -o root -g wheel -m 755 etc.i386/kc.profile \
234277Srgrimes	    ${MOUNT}/.profile
2351194Srgrimes	install -c -o root -g wheel -m 755 ${RELEASEDIR}/distbin/kcopy \
2361194Srgrimes	    ${MOUNT}/bin/kcopy
2371194Srgrimes	(cd ${MOUNT}/; \
2381194Srgrimes	    for i in ${KC_LINKS}; do \
2391194Srgrimes		ln bin/kcopy $$i; \
2401194Srgrimes	    done)
241320Srgrimes
242372Srgrimeskcopy-ah-floppy:
243372Srgrimes	${MAKE} kcopy-floppy
244320Srgrimes	(cd ../sys/compile/GENERICAH; \
245277Srgrimes	    install -c -o root -g wheel -m 755 386bsd ${MOUNT}/)
246277Srgrimes	df -ik ${MOUNT}
2471027Sache	umount /dev/${FLOPPY}
2481027Sache	fsck /dev/r${FLOPPY}
2491027Sache	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/kcopy-ah-floppy \
250358Srgrimes		bs=15b count=160
251372Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy-ah-floppy \
252372Srgrimes		>${RELEASEDIR}/floppies/kcopy-ah-floppy.gz
253277Srgrimes
254372Srgrimeskcopy-bt-floppy:
255372Srgrimes	${MAKE} kcopy-floppy
256320Srgrimes	(cd ../sys/compile/GENERICBT; \
257320Srgrimes	    install -c -o root -g wheel -m 755 386bsd ${MOUNT}/)
258320Srgrimes	df -ik ${MOUNT}
2591027Sache	umount /dev/${FLOPPY}
2601027Sache	fsck /dev/r${FLOPPY}
2611027Sache	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/kcopy-bt-floppy \
262358Srgrimes		bs=15b count=160
263372Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy-bt-floppy \
264372Srgrimes		>${RELEASEDIR}/floppies/kcopy-bt-floppy.gz
265320Srgrimes
266358Srgrimesfilesystem-floppy:
267568Srgrimes	disklabel -w -r ${FLOPPY} ${FLOPPY_TYPE} \
268568Srgrimes		/usr/mdec/fdboot /usr/mdec/bootfd
269568Srgrimes	newfs -b 4096 -c 80 -f 512 -i 10240 -m 0 -o space \
2701027Sache		r${FLOPPY}  ${FLOPPY_TYPE}
2711027Sache	mount /dev/${FLOPPY}  ${MOUNT}
272333Srgrimes	chown root.wheel ${MOUNT}/.
273333Srgrimes	chmod 755 ${MOUNT}/.
274284Srgrimes	(cd ${DESTDIR}/; \
275358Srgrimes	    ls -d ${FILESYSTEM_DIRS} | cpio -pdamuv ${MOUNT})
276284Srgrimes	(cd ${MOUNT}/dev; \
277284Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV std; \
278284Srgrimes	    rm -rf fd; \
279435Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV fd0 fd1 wd0 sd0 sd1; \
2801126Srgrimes	    rm -f fd0?* fd1?* rfd0?* rfd1?*)
281284Srgrimes	(cd ${DESTDIR}/; \
2821194Srgrimes	    ls ${FILESYSTEM_FILES} | cpio -pdamuv ${MOUNT}; \
2831194Srgrimes	    ls ${FILESYSTEM_CPIO} | \
2841194Srgrimes		cpio -H newc --block-size=16 -oav | \
2851194Srgrimes		gzip -9 >${MOUNT}/inst1.cpio.gz)
286284Srgrimes	install -c -o root -g wheel -m 755 etc.i386/inst1.profile \
287284Srgrimes	    ${MOUNT}/.profile
288284Srgrimes	install -c -o root -g wheel -m 755 etc.i386/inst1.install \
289284Srgrimes	    ${MOUNT}/install
2901194Srgrimes	install -c -o root -g wheel -m 755 ${RELEASEDIR}/distbin/filesystem \
2911194Srgrimes	    ${MOUNT}/bin/filesystem
292284Srgrimes	(cd ${MOUNT}/; \
2931194Srgrimes	    for i in ${FILESYSTEM_LINKS}; do \
2941194Srgrimes		ln bin/filesystem $$i; \
2951194Srgrimes	    done)
2961194Srgrimes	(cd ${MOUNT}/; \
297358Srgrimes	    ls ${FILESYSTEM_FILES} >/tmp/filelist; \
2981194Srgrimes	    ls ${FILESYSTEM_LINKS} >>/tmp/filelist; \
299358Srgrimes	    ls -d ${FILESYSTEM_DIRS} >>/tmp/filelist; \
300358Srgrimes	    find ${FILESYSTEM_TREES} >>/tmp/filelist; \
301333Srgrimes	    sort -u /tmp/filelist >filelist; \
302333Srgrimes	    rm /tmp/filelist)
303284Srgrimes	df -ik ${MOUNT}
3041027Sache	umount /dev/${FLOPPY}
3051027Sache	fsck /dev/r${FLOPPY}
3061027Sache	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/filesystem-floppy \
307358Srgrimes		bs=15b count=160
308372Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/filesystem-floppy \
309372Srgrimes		>${RELEASEDIR}/floppies/filesystem-floppy.gz
310284Srgrimes
311358Srgrimescpio-floppy:
312568Srgrimes	disklabel -w -r ${FLOPPY} ${FLOPPY_TYPE} \
313568Srgrimes		/usr/mdec/fdboot /usr/mdec/bootfd
314568Srgrimes	newfs -b 4096 -c 80 -f 512 -i 65536 -m 0 -o space \
3151027Sache			r${FLOPPY}  ${FLOPPY_TYPE}
3161027Sache	mount /dev/${FLOPPY} ${MOUNT}
317333Srgrimes	chown root.wheel ${MOUNT}/.
318333Srgrimes	chmod 755 ${MOUNT}/.
319284Srgrimes	(cd ${DESTDIR}/; \
320358Srgrimes		ls ${CPIO_FILES} | cpio -pdamuv ${MOUNT})
321284Srgrimes	(cd ${DESTDIR}/; \
322444Srgrimes	    (find ${CPIO_CPIO}; ls -d ${CPIO_CPIO_DIRS}) | \
3231194Srgrimes		cpio -H newc --block-size=16 -oav | \
3241194Srgrimes		gzip -9 >${MOUNT}/inst2.cpio.gz)
3251194Srgrimes	install -c -o root -g wheel -m 755 etc.i386/cpio.rc \
3261194Srgrimes	    ${MOUNT}/rc
3271194Srgrimes	install -c -o root -g wheel -m 755 etc.i386/cpio.install \
328284Srgrimes	    ${MOUNT}/install
3291194Srgrimes	install -c -o root -g wheel -m 755 etc.i386/cpio.magic \
3301194Srgrimes	    ${MOUNT}/magic
331284Srgrimes	df -ik ${MOUNT}
3321027Sache	umount /dev/${FLOPPY}
3331027Sache	fsck /dev/r${FLOPPY}
3341027Sache	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/cpio-floppy \
335358Srgrimes		bs=15b count=160
336372Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/cpio-floppy \
337372Srgrimes		>${RELEASEDIR}/floppies/cpio-floppy.gz
338284Srgrimes
339372Srgrimesbin-tarball:
340372Srgrimes	(cd ${DESTDIR}; \
341538Srgrimes		tar cf - . | \
342538Srgrimes		gzip --no-name -9 -c | \
343538Srgrimes		split -b 240640 - \
344538Srgrimes		${RELEASEDIR}/tarballs/bin_tgz.)
345372Srgrimes
346538Srgrimessrcbase-tarball:
347376Srgrimes	(cd ${DESTDIR}; \
348538Srgrimes		tar -cf - usr/src/[A-Z]* | \
349538Srgrimes		gzip --no-name -9 -c | \
350538Srgrimes		split -b 240640 - \
351538Srgrimes		${RELEASEDIR}/tarballs/srcbase_tgz.)
352376Srgrimes
353538Srgrimessrcbin-tarball:
354376Srgrimes	(cd ${DESTDIR}; \
355538Srgrimes		tar -cf - usr/src/bin | \
356538Srgrimes		gzip --no-name -9 -c | \
357538Srgrimes		split -b 240640 - \
358538Srgrimes		${RELEASEDIR}/tarballs/srcbin_tgz.)
359376Srgrimes
360538Srgrimessrccontrib-tarball:
361538Srgrimes	(cd ${DESTDIR}; \
362538Srgrimes		tar -cf - usr/src/contrib | \
363538Srgrimes		gzip --no-name -9 -c | \
364538Srgrimes		split -b 240640 - \
365538Srgrimes		${RELEASEDIR}/tarballs/srccontrib_tgz.)
366538Srgrimes
367538Srgrimessrcetc-tarball:
368538Srgrimes	(cd ${DESTDIR}; \
369538Srgrimes		tar -cf - usr/src/etc | \
370538Srgrimes		gzip --no-name -9 -c | \
371538Srgrimes		split -b 240640 - \
372538Srgrimes		${RELEASEDIR}/tarballs/srcetc_tgz.)
373538Srgrimes
374538Srgrimessrcgames-tarball:
375538Srgrimes	(cd ${DESTDIR}; \
376538Srgrimes		tar -cf - usr/src/games | \
377538Srgrimes		gzip --no-name -9 -c | \
378538Srgrimes		split -b 240640 - \
379538Srgrimes		${RELEASEDIR}/tarballs/srcgames_tgz.)
380538Srgrimes
381538Srgrimessrcgnu-tarball:
382538Srgrimes	(cd ${DESTDIR}; \
383538Srgrimes		tar -cf - usr/src/gnu | \
384538Srgrimes		gzip --no-name -9 -c | \
385538Srgrimes		split -b 240640 - \
386538Srgrimes		${RELEASEDIR}/tarballs/srcgnu_tgz.)
387538Srgrimes
388538Srgrimessrcinclude-tarball:
389538Srgrimes	(cd ${DESTDIR}; \
390538Srgrimes		tar -cf - usr/src/include | \
391538Srgrimes		gzip --no-name -9 -c | \
392538Srgrimes		split -b 240640 - \
393538Srgrimes		${RELEASEDIR}/tarballs/srcinclude_tgz.)
394538Srgrimes
395538Srgrimessrclib-tarball:
396538Srgrimes	(cd ${DESTDIR}; \
397538Srgrimes		tar --exclude usr/src/${CRYPT_LIB} -cf - usr/src/lib | \
398538Srgrimes		gzip --no-name -9 -c | \
399538Srgrimes		split -b 240640 - \
400538Srgrimes		${RELEASEDIR}/tarballs/srclib_tgz.)
401538Srgrimes
402538Srgrimessrclibcrypt-tarball:
403538Srgrimes	(cd ${DESTDIR}; \
404538Srgrimes		tar -cf - usr/src/${CRYPT_LIB} | \
405538Srgrimes		gzip --no-name -9 -c | \
406538Srgrimes		split -b 240640 - \
407538Srgrimes		${RELEASEDIR}/tarballs/srclibcrypt_tgz.)
408538Srgrimes
409538Srgrimessrclibexec-tarball:
410538Srgrimes	(cd ${DESTDIR}; \
411538Srgrimes		tar -cf - usr/src/libexec | \
412538Srgrimes		gzip --no-name -9 -c | \
413538Srgrimes		split -b 240640 - \
414538Srgrimes		${RELEASEDIR}/tarballs/srclibexec_tgz.)
415538Srgrimes
416538Srgrimessrcsbin-tarball:
417538Srgrimes	(cd ${DESTDIR}; \
418538Srgrimes		tar -cf - usr/src/sbin | \
419538Srgrimes		gzip --no-name -9 -c | \
420538Srgrimes		split -b 240640 - \
421538Srgrimes		${RELEASEDIR}/tarballs/srcsbin_tgz.)
422538Srgrimes
423538Srgrimessrcshare-tarball:
424538Srgrimes	(cd ${DESTDIR}; \
425538Srgrimes		tar -cf - usr/src/share | \
426538Srgrimes		gzip --no-name -9 -c | \
427538Srgrimes		split -b 240640 - \
428538Srgrimes		${RELEASEDIR}/tarballs/srcshare_tgz.)
429538Srgrimes
430538Srgrimessrcsys-tarball:
431538Srgrimes	(cd ${DESTDIR}; \
432538Srgrimes		tar -cf - usr/src/sys | \
433538Srgrimes		gzip --no-name -9 -c | \
434538Srgrimes		split -b 240640 - \
435538Srgrimes		${RELEASEDIR}/tarballs/srcsys_tgz.)
436538Srgrimes
437538Srgrimessrcusrbin-tarball:
438538Srgrimes	(cd ${DESTDIR}; \
439538Srgrimes		tar -cf - usr/src/usr.bin | \
440538Srgrimes		gzip --no-name -9 -c | \
441538Srgrimes		split -b 240640 - \
442538Srgrimes		${RELEASEDIR}/tarballs/srcusrbin_tgz.)
443538Srgrimes
444538Srgrimessrcusrsbin-tarball:
445538Srgrimes	(cd ${DESTDIR}; \
446538Srgrimes		tar -cf - usr/src/usr.sbin | \
447538Srgrimes		gzip --no-name -9 -c | \
448538Srgrimes		split -b 240640 - \
449538Srgrimes		${RELEASEDIR}/tarballs/srcusrsbin_tgz.)
450538Srgrimes
451538Srgrimessrc-tarball: srcbase-tarball srcbin-tarball srccontrib-tarball srcetc-tarball \
452538Srgrimes	srcgames-tarball srcgnu-tarball srcinclude-tarball srclib-tarball \
453538Srgrimes	srclibcrypt-tarball srclibexec-tarball srcsbin-tarball \
454538Srgrimes	srcshare-tarball srcsys-tarball srcusrbin-tarball \
455538Srgrimes	srcusrsbin-tarball
456538Srgrimes
457372Srgrimesdes-tarball:
458372Srgrimes	rm -rf ${RELEASEDIR}/tmpdes
459372Srgrimes	mkdir ${RELEASEDIR}/tmpdes
460372Srgrimes	for i in ${CRYPT_DIRS}; do \
461372Srgrimes		cd ${RELEASEDIR}/tmpdes; \
462372Srgrimes		mkdir $$i; \
463372Srgrimes		chown ${BINOWN}.${GRPOWN} $$i; \
464372Srgrimes		chmod 755 $$i; \
465372Srgrimes	done
466372Srgrimes	# This is ugly, it force installs a /usr/lib/libcrypt.a so
467372Srgrimes	# that the other makes will be built with des.
468372Srgrimes	#
469372Srgrimes	(cd ${.CURDIR}/../${CRYPT_LIB}; \
470372Srgrimes		unset NOCRYPT; \
471372Srgrimes		DESTDIR=; export DESTDIR; \
472372Srgrimes		${MAKE} cleandir obj depend all install; \
473372Srgrimes		NOMAN=noman; export NOMAN; \
474372Srgrimes		DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
475372Srgrimes		${MAKE} cleandir obj depend all install)
476372Srgrimes	for i in ${CRYPT_SRCS}; do \
477372Srgrimes		unset NOCRYPT; \
478372Srgrimes		DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
479372Srgrimes		NOMAN=noman; export NOMAN; \
480372Srgrimes		cd ${.CURDIR}/../$$i; \
481372Srgrimes		${MAKE} cleandir obj depend all install; \
482372Srgrimes	done
483372Srgrimes	(cd ${RELEASEDIR}/tmpdes; \
484538Srgrimes		tar cf - . | \
485538Srgrimes			gzip --no-name -9 -c | \
486372Srgrimes			split -b 240640 - \
487436Srgrimes			${RELEASEDIR}/tarballs/des_tgz.)
488372Srgrimes	rm -rf ${RELEASEDIR}/tmpdes
489372Srgrimes
490147Srgrimesdistrib-dirs:
491238Sroot	mtree -u -f mtree/BSD.root.dist -p ${DESTDIR}/
492147Srgrimes	mtree -u -f mtree/BSD.var.dist -p ${DESTDIR}/var
493147Srgrimes	mtree -u -f mtree/BSD.usr.dist -p ${DESTDIR}/usr
494372Srgrimes.if defined(CDROMDIST)
495372Srgrimes	mtree -u -f mtree/BSD.local.dist -p ${DESTDIR}/usr/local
496372Srgrimes.endif
497410Srgrimes	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
498147Srgrimes
499372Srgrimesfloppies: kcopy-ah-floppy kcopy-bt-floppy filesystem-floppy \
500372Srgrimes	  cpio-floppy
501372Srgrimes
5021126Srgrimesrelease: release-dirs distribution kcopy-kernels \
503376Srgrimes	 bin-tarball des-tarball
504372Srgrimes	
505372Srgrimesrelease-dirs:
506994Srgrimes	rm -rf ${RELEASEDIR}/filesys
507994Srgrimes	mkdir ${RELEASEDIR}/filesys
508994Srgrimes	chown root.wheel ${RELEASEDIR}/filesys
509994Srgrimes	chmod 755 ${RELEASEDIR}/filesys
510372Srgrimes	rm -rf ${RELEASEDIR}/tarballs
511372Srgrimes	mkdir ${RELEASEDIR}/tarballs
512372Srgrimes	chown root.wheel ${RELEASEDIR}/tarballs
513372Srgrimes	chmod 755 ${RELEASEDIR}/tarballs
514372Srgrimes	rm -rf ${RELEASEDIR}/floppies
515372Srgrimes	mkdir ${RELEASEDIR}/floppies
516372Srgrimes	chown root.wheel ${RELEASEDIR}/floppies
517372Srgrimes	chmod 755 ${RELEASEDIR}/floppies
518372Srgrimes
51937Srgrimes.include <bsd.prog.mk>
520