Makefile revision 1205
11195Srgrimes#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
21205Srgrimes#	$Id: Makefile,v 1.52 1994/02/21 21:53:20 rgrimes Exp $
337Srgrimes
4358SrgrimesNOOBJ=	noobj
537Srgrimes
637Srgrimes# disktab may be wrong -- hcx9 is a tahoe, but gets its own.
737Srgrimes# -rw-r--r--
8147SrgrimesBINOWN= root
9147SrgrimesBINGRP= wheel
10147SrgrimesBIN1=	aliases csh.cshrc csh.login csh.logout dm.conf \
11207Snate	ftpusers gettytab group hosts host.conf hosts.equiv hosts.lpd \
12377Srgrimes	inetd.conf motd myname netstart networks phones \
13147Srgrimes	printcap protocols rc rc.local remote security services shells \
14147Srgrimes	syslog.conf ttys etc.${MACHINE}/disktab rpc
1537Srgrimes
1637Srgrimes# -rw-rw-rw-
1737SrgrimesBIN2=	motd
1837Srgrimes
19147Srgrimes# -rwxr-xr-x root.wheel, for the new f***ing cron root.wheel
20147SrgrimesBIN3=	daily weekly monthly
21147Srgrimes
22491SrgrimesMTREE=	BSD.local.dist BSD.root.dist BSD.usr.dist BSD.var.dist
2337SrgrimesNAMEDB=	localhost.rev named.boot root.cache
2437SrgrimesPCS=	pcs750.bin
2537SrgrimesWCS1=	wcs fppwcs poc poc1 poc2 fppoc
2637SrgrimesWCS2=	fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual
2737Srgrimes
28263Srgrimes# Special top level files for FreeBSD
291130SrgrimesCOPYRIGHT=	COPYRIGHT.386BSD COPYRIGHT.FreeBSD
30993SrgrimesFREEBSD=	CONTRIB.386BSD CONTRIB.FreeBSD
311126SrgrimesFREEBSD+=	MIRROR.SITES PERSONAL.ACKS RELNOTES.FreeBSD SUPPORT.TXT
32993SrgrimesFREEBSD+=	${COPYRIGHT}
33277Srgrimes#
34277Srgrimes# Floppy drive name and files for building FreeBSD Floppies
35284SrgrimesFLOPPY?=	fd0
36463SrgrimesMOUNT?=		/mnt
371205SrgrimesFLOPPY_TYPE?=	fd1200
38284Srgrimes#
39284SrgrimesMDEC=		usr/mdec/bootfd usr/mdec/fdboot
40284SrgrimesMDEC+=		usr/mdec/bootsd usr/mdec/sdboot
41284SrgrimesMDEC+=		usr/mdec/bootwd usr/mdec/wdboot
42284Srgrimes#
431194SrgrimesKC_DIRS=	dev mnt bin sbin
44284SrgrimesKC_FILES=	${COPYRIGHT}
451194SrgrimesKC_FILES+=	bin/sh					# XXX Crunch is broken!
461194SrgrimesKC_LINKS=	bin/[ bin/cp bin/echo bin/test
471194SrgrimesKC_LINKS+=	sbin/fsck sbin/halt sbin/init sbin/mount sbin/umount
48284Srgrimes#
491194SrgrimesFILESYSTEM_DIRS=	bin dev etc mnt proc sbin usr usr/bin usr/mdec usr/sbin
50358SrgrimesFILESYSTEM_TREES=	dev
51358SrgrimesFILESYSTEM_FILES=	${COPYRIGHT}
521194SrgrimesFILESYSTEM_FILES+=	bin/sh				# XXX Crunch is broken!
53412SalmFILESYSTEM_FILES+=	dev/MAKEDEV
54358SrgrimesFILESYSTEM_FILES+=	etc/group
55452SrgrimesFILESYSTEM_FILES+=	etc/master.passwd etc/passwd etc/pwd.db
56358SrgrimesFILESYSTEM_FILES+=	${MDEC}
571194SrgrimesFILESYSTEM_LINKS=	bin/[ bin/expr bin/ls bin/mkdir bin/rm
581194SrgrimesFILESYSTEM_LINKS+=	bin/sync bin/test
591194SrgrimesFILESYSTEM_LINKS+=	sbin/disklabel sbin/fdisk sbin/halt sbin/init
601194SrgrimesFILESYSTEM_LINKS+=	sbin/mount sbin/mount_pcfs
611194SrgrimesFILESYSTEM_LINKS+=	sbin/newfs
621194SrgrimesFILESYSTEM_LINKS+=	sbin/umount
631194SrgrimesFILESYSTEM_LINKS+=	usr/bin/cpio
641194SrgrimesFILESYSTEM_LINKS+=	usr/bin/gunzip usr/bin/gzcat usr/bin/gzip usr/bin/zcat
651194SrgrimesFILESYSTEM_LINKS+=	usr/sbin/bad144
661194SrgrimesFILESYSTEM_CPIO=	.profile
671194SrgrimesFILESYSTEM_CPIO+=	root/.profile
681194SrgrimesFILESYSTEM_CPIO+=	bin/[
691194SrgrimesFILESYSTEM_CPIO+=	bin/chmod bin/cat bin/cp bin/df bin/expr bin/ls
701194SrgrimesFILESYSTEM_CPIO+=	bin/ln bin/mkdir bin/mv bin/rm bin/sync
711194SrgrimesFILESYSTEM_CPIO+=	bin/test
721194SrgrimesFILESYSTEM_CPIO+=	etc/spwd.db
731194SrgrimesFILESYSTEM_CPIO+=	sbin/disklabel sbin/fdisk sbin/halt sbin/init
741194SrgrimesFILESYSTEM_CPIO+=	sbin/mount sbin/mount_pcfs
751194SrgrimesFILESYSTEM_CPIO+=	sbin/newfs
761194SrgrimesFILESYSTEM_CPIO+=	sbin/umount
77263Srgrimes
78358SrgrimesCPIO_FILES=	${COPYRIGHT}
791194SrgrimesCPIO_CPIO=	bin/dd bin/ps bin/pwd bin/stty
801194SrgrimesCPIO_CPIO+=	etc/protocols etc/remote etc/services
811194SrgrimesCPIO_CPIO+=	etc/termcap
821194SrgrimesCPIO_CPIO+=	sbin/dmesg
83452SrgrimesCPIO_CPIO+=	sbin/ifconfig sbin/fsck sbin/mknod sbin/mount_isofs
841194SrgrimesCPIO_CPIO+=	sbin/mount_procfs
85452SrgrimesCPIO_CPIO+=	sbin/reboot sbin/route sbin/slattach
861194SrgrimesCPIO_CPIO+=	usr/bin/awk usr/bin/chgrp usr/bin/cpio usr/bin/ex usr/bin/ftp
871194SrgrimesCPIO_CPIO+=	usr/bin/gunzip usr/bin/gzcat usr/bin/gzip
88358SrgrimesCPIO_CPIO+=	usr/bin/more usr/bin/tar usr/bin/tip
891194SrgrimesCPIO_CPIO+=	usr/bin/vi usr/bin/view usr/bin/zcat
901194SrgrimesCPIO_CPIO+=	usr/libexec/ld.so
911194SrgrimesCPIO_CPIO+=	usr/lib/libc.so.1.0
921194SrgrimesCPIO_CPIO+=	usr/lib/libcurses.so.1.0
931194SrgrimesCPIO_CPIO+=	usr/lib/libgcc.so.1.0
941194SrgrimesCPIO_CPIO+=	usr/lib/libm.so.1.0
951194SrgrimesCPIO_CPIO+=	usr/lib/libtermlib.so.1.0
961194SrgrimesCPIO_CPIO+=	usr/lib/libtermcap.so.1.0
971194SrgrimesCPIO_CPIO+=	usr/lib/libutil.so.1.0
981194SrgrimesCPIO_CPIO+=	usr/sbin/bad144 usr/sbin/chown
991194SrgrimesCPIO_CPIO+=	usr/share/misc/termcap
100813SrgrimesCPIO_CPIO_DIRS=	tmp var var/tmp var/run var/spool var/spool/lock
101284Srgrimes
102347SrgrimesCRYPT_LIB=	lib/libcrypt
103372SrgrimesCRYPT_SRCS=	bin/ed bin/rcp
104372SrgrimesCRYPT_SRCS+=	libexec/ftpd libexec/makekey libexec/rexecd libexec/rlogind
105372SrgrimesCRYPT_SRCS+=	libexec/rshd libexec/telnetd libexec/uucpd
1061126SrgrimesCRYPT_SRCS+=	sbin/init.bsdi
107372SrgrimesCRYPT_SRCS+=	usr.bin/bdes usr.bin/lock usr.bin/login usr.bin/passwd
108372SrgrimesCRYPT_SRCS+=	usr.bin/rlogin usr.bin/rsh usr.bin/su usr.bin/telnet
1091126SrgrimesCRYPT_DIRS=	bin sbin usr usr/bin usr/lib usr/libexec 
110347Srgrimes
11137Srgrimesall clean cleandir depend etc install lint:
11237Srgrimes
113347Srgrimescrypt:
114347Srgrimes	rm -f ${LIBCRYPT};
115347Srgrimes	(cd ${.CURDIR}/../${CRYPT_LIB}; \
116355Srgrimes		${MAKE} cleandir obj depend all install)
117372Srgrimes	for i in ${CRYPT_SRCS}; do \
118347Srgrimes		cd ${.CURDIR}/../$$i; \
119355Srgrimes		${MAKE} cleandir obj depend all; \
120347Srgrimes	done
121347Srgrimes	
122347Srgrimesnon-crypt:
123347Srgrimes	rm -f ${LIBCRYPT}
124372Srgrimes	for i in ${CRYPT_SRCS}; do \
125347Srgrimes		cd ${.CURDIR}/../$$i; \
126355Srgrimes		${MAKE} cleandir obj depend all; \
127347Srgrimes	done
128347Srgrimes	
129147Srgrimesdistribution: distrib-dirs
13037Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
13137Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc
132147Srgrimes	install -c -o root -g wheel -m 755 ${BIN3} ${DESTDIR}/etc
1331014Snate	install -c -o root -g wheel -m 644 crontab ${DESTDIR}/etc
134238Sroot	install -c -o root -g wheel -m 600 /dev/null ${DESTDIR}/var/cron/log
13537Srgrimes	install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
136358Srgrimes	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
13737Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
13837Srgrimes	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
139347Srgrimes.if defined(CDROMDIST)
140147Srgrimes	(cd ${DESTDIR}/dev; sh MAKEDEV all)
141347Srgrimes.endif
14237Srgrimes	(cd root; \
14337Srgrimes		install -c -o root -g wheel -m 644 dot.cshrc \
14437Srgrimes		    ${DESTDIR}/root/.cshrc; \
14537Srgrimes		install -c -o root -g wheel -m 644 dot.klogin \
14637Srgrimes		    ${DESTDIR}/root/.klogin; \
14737Srgrimes		install -c -o root -g wheel -m 644 dot.login \
14837Srgrimes		    ${DESTDIR}/root/.login; \
14937Srgrimes		install -c -o root -g wheel -m 644 dot.profile \
15037Srgrimes		    ${DESTDIR}/root/.profile; \
15137Srgrimes		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
15237Srgrimes		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
15337Srgrimes		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
15437Srgrimes	cd mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${MTREE} \
15537Srgrimes	    ${DESTDIR}/etc/mtree
15637Srgrimes	cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
15737Srgrimes	    ${DESTDIR}/etc/namedb
15837Srgrimes	install -c -o ${BINOWN} -g operator -m 664 /dev/null \
15937Srgrimes	    ${DESTDIR}/etc/dumpdates
160147Srgrimes	install -c -o nobody -g ${BINGRP} -m 664 /dev/null \
161147Srgrimes	    ${DESTDIR}/var/db/locate.database
16237Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
163147Srgrimes	    ${DESTDIR}/var/log/lpd-errs
16437Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
16537Srgrimes	    ${DESTDIR}/var/log/maillog
16637Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
167288Srgrimes	    ${DESTDIR}/var/log/lastlog
168288Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
169147Srgrimes	    ${DESTDIR}/var/log/messages
17037Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
171147Srgrimes	    ${DESTDIR}/var/log/wtmp
172147Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
17337Srgrimes	    ${DESTDIR}/var/run/utmp
17437Srgrimes	(cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
175147Srgrimes	    fstab.* ${DESTDIR}/etc)
176347Srgrimes.if defined(NOCRYPT)
177355Srgrimes	${MAKE} non-crypt
178355Srgrimes	(cd ..; NOCRYPT=nocrypt; export NOCRYPT; ${MAKE} install)
179347Srgrimes.else
180355Srgrimes	${MAKE} crypt
181355Srgrimes	(cd ..; ${MAKE} install)
182347Srgrimes.endif
183277Srgrimes	(cd ../usr.sbin/sendmail/src; \
184355Srgrimes	    ${MAKE} install; \
185277Srgrimes	 cd ../cf/cf; \
1861126Srgrimes	    ${MAKE} obj; \
1871126Srgrimes	    ${MAKE} freefall.cf; \
1881133Srgrimes	    install -o root -g wheel -m 644 obj/freefall.cf \
189238Sroot	        ${DESTDIR}/etc/sendmail.cf)
190277Srgrimes	(cd ../; \
191277Srgrimes	    install -c -o root -g wheel -m 444 ${FREEBSD} ${DESTDIR}/)
192355Srgrimes	(cd ..; ${MAKE} mdec; )
193644Srgrimes	(cd ../share/man; ${MAKE} makedb; )
194333Srgrimes.if ${MACHINE} == "tahoe"
195333Srgrimes	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \
196333Srgrimes	    ${DESTDIR}/)
197168Srgrimes.endif
198333Srgrimes.if ${MACHINE} == "vax"
199333Srgrimes	(cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
200333Srgrimes	    ${DESTDIR}/)
201333Srgrimes.endif
20237Srgrimes
20337Srgrimeshcx9-distribution:
20437Srgrimes	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \
20537Srgrimes	    ${DESTDIR}/)
20637Srgrimes
207358Srgrimeskcopy-kernels: ../sys/i386/conf/GENERICAH ../sys/i386/conf/GENERICBT
208320Srgrimes	(cd ../sys/compile; rm -rf GENERICAH GENERICBT)
209320Srgrimes	(cd ../sys/i386/conf; config GENERICAH; config GENERICBT)
210355Srgrimes	(cd ../sys/compile/GENERICAH; ${MAKE} depend; ${MAKE} all; \
211320Srgrimes	    install -c -o root -g wheel -m 755 386bsd \
212320Srgrimes	        ${DESTDIR}/386bsd.GENERICAH)
213355Srgrimes	(cd ../sys/compile/GENERICBT; ${MAKE} depend; ${MAKE} all; \
214320Srgrimes	    install -c -o root -g wheel -m 755 386bsd \
215320Srgrimes	        ${DESTDIR}/386bsd.GENERICBT)
216320Srgrimes
217358Srgrimeskcopy-floppy:
218568Srgrimes	disklabel -w -r ${FLOPPY} ${FLOPPY_TYPE} \
219568Srgrimes		/usr/mdec/fdboot /usr/mdec/bootfd
220568Srgrimes	newfs -b 4096 -c 80 -f 512 -i 16384 -m 0 -o space \
2211027Sache		r${FLOPPY} ${FLOPPY_TYPE}
2221027Sache	mount /dev/${FLOPPY} ${MOUNT}
223333Srgrimes	chown root.wheel ${MOUNT}/.
224333Srgrimes	chmod 755 ${MOUNT}/.
225284Srgrimes	(cd ${DESTDIR}/; \
226320Srgrimes	    ls -d ${KC_DIRS} | cpio -pdamuv ${MOUNT})
227277Srgrimes	(cd ${MOUNT}/dev; \
228277Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV std; \
229277Srgrimes	    rm -rf fd; \
2301126Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0 sd1; \
2311126Srgrimes	    rm -rf fd0?* rfd0?*;)
232284Srgrimes	(cd ${DESTDIR}/; \
233320Srgrimes	    ls ${KC_FILES} | cpio -pdamuv ${MOUNT})
234277Srgrimes	install -c -o root -g wheel -m 755 etc.i386/kc.profile \
235277Srgrimes	    ${MOUNT}/.profile
2361194Srgrimes	install -c -o root -g wheel -m 755 ${RELEASEDIR}/distbin/kcopy \
2371194Srgrimes	    ${MOUNT}/bin/kcopy
2381194Srgrimes	(cd ${MOUNT}/; \
2391194Srgrimes	    for i in ${KC_LINKS}; do \
2401194Srgrimes		ln bin/kcopy $$i; \
2411194Srgrimes	    done)
242320Srgrimes
2431205Srgrimeskcopy_ah.flp:
244372Srgrimes	${MAKE} kcopy-floppy
245320Srgrimes	(cd ../sys/compile/GENERICAH; \
246277Srgrimes	    install -c -o root -g wheel -m 755 386bsd ${MOUNT}/)
247277Srgrimes	df -ik ${MOUNT}
2481027Sache	umount /dev/${FLOPPY}
2491027Sache	fsck /dev/r${FLOPPY}
2501205Srgrimes	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/kcopy_ah.flp \
251358Srgrimes		bs=15b count=160
2521205Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy_ah.flp \
2531205Srgrimes		>${RELEASEDIR}/floppies/kcopy_ah.flp.gz
254277Srgrimes
2551205Srgrimeskcopy_bt.flp:
256372Srgrimes	${MAKE} kcopy-floppy
257320Srgrimes	(cd ../sys/compile/GENERICBT; \
258320Srgrimes	    install -c -o root -g wheel -m 755 386bsd ${MOUNT}/)
259320Srgrimes	df -ik ${MOUNT}
2601027Sache	umount /dev/${FLOPPY}
2611027Sache	fsck /dev/r${FLOPPY}
2621205Srgrimes	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/kcopy_bt.flp \
263358Srgrimes		bs=15b count=160
2641205Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy_bt.flp \
2651205Srgrimes		>${RELEASEDIR}/floppies/kcopy_bt.flp.gz
266320Srgrimes
2671205Srgrimesfilesyst.flp:
268568Srgrimes	disklabel -w -r ${FLOPPY} ${FLOPPY_TYPE} \
269568Srgrimes		/usr/mdec/fdboot /usr/mdec/bootfd
270568Srgrimes	newfs -b 4096 -c 80 -f 512 -i 10240 -m 0 -o space \
2711027Sache		r${FLOPPY}  ${FLOPPY_TYPE}
2721027Sache	mount /dev/${FLOPPY}  ${MOUNT}
273333Srgrimes	chown root.wheel ${MOUNT}/.
274333Srgrimes	chmod 755 ${MOUNT}/.
275284Srgrimes	(cd ${DESTDIR}/; \
276358Srgrimes	    ls -d ${FILESYSTEM_DIRS} | cpio -pdamuv ${MOUNT})
277284Srgrimes	(cd ${MOUNT}/dev; \
278284Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV std; \
279284Srgrimes	    rm -rf fd; \
280435Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV fd0 fd1 wd0 sd0 sd1; \
2811126Srgrimes	    rm -f fd0?* fd1?* rfd0?* rfd1?*)
282284Srgrimes	(cd ${DESTDIR}/; \
2831194Srgrimes	    ls ${FILESYSTEM_FILES} | cpio -pdamuv ${MOUNT}; \
2841194Srgrimes	    ls ${FILESYSTEM_CPIO} | \
2851194Srgrimes		cpio -H newc --block-size=16 -oav | \
2861194Srgrimes		gzip -9 >${MOUNT}/inst1.cpio.gz)
287284Srgrimes	install -c -o root -g wheel -m 755 etc.i386/inst1.profile \
288284Srgrimes	    ${MOUNT}/.profile
289284Srgrimes	install -c -o root -g wheel -m 755 etc.i386/inst1.install \
290284Srgrimes	    ${MOUNT}/install
2911194Srgrimes	install -c -o root -g wheel -m 755 ${RELEASEDIR}/distbin/filesystem \
2921194Srgrimes	    ${MOUNT}/bin/filesystem
293284Srgrimes	(cd ${MOUNT}/; \
2941194Srgrimes	    for i in ${FILESYSTEM_LINKS}; do \
2951194Srgrimes		ln bin/filesystem $$i; \
2961194Srgrimes	    done)
2971194Srgrimes	(cd ${MOUNT}/; \
298358Srgrimes	    ls ${FILESYSTEM_FILES} >/tmp/filelist; \
2991194Srgrimes	    ls ${FILESYSTEM_LINKS} >>/tmp/filelist; \
300358Srgrimes	    ls -d ${FILESYSTEM_DIRS} >>/tmp/filelist; \
301358Srgrimes	    find ${FILESYSTEM_TREES} >>/tmp/filelist; \
302333Srgrimes	    sort -u /tmp/filelist >filelist; \
303333Srgrimes	    rm /tmp/filelist)
304284Srgrimes	df -ik ${MOUNT}
3051027Sache	umount /dev/${FLOPPY}
3061027Sache	fsck /dev/r${FLOPPY}
3071205Srgrimes	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/filesyst.flp \
308358Srgrimes		bs=15b count=160
3091205Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/filesyst.flp \
3101205Srgrimes		>${RELEASEDIR}/floppies/filesyst.flp.gz
311284Srgrimes
3121205Srgrimescpio.flp:
313568Srgrimes	disklabel -w -r ${FLOPPY} ${FLOPPY_TYPE} \
314568Srgrimes		/usr/mdec/fdboot /usr/mdec/bootfd
315568Srgrimes	newfs -b 4096 -c 80 -f 512 -i 65536 -m 0 -o space \
3161027Sache			r${FLOPPY}  ${FLOPPY_TYPE}
3171027Sache	mount /dev/${FLOPPY} ${MOUNT}
318333Srgrimes	chown root.wheel ${MOUNT}/.
319333Srgrimes	chmod 755 ${MOUNT}/.
320284Srgrimes	(cd ${DESTDIR}/; \
321358Srgrimes		ls ${CPIO_FILES} | cpio -pdamuv ${MOUNT})
322284Srgrimes	(cd ${DESTDIR}/; \
323444Srgrimes	    (find ${CPIO_CPIO}; ls -d ${CPIO_CPIO_DIRS}) | \
3241194Srgrimes		cpio -H newc --block-size=16 -oav | \
3251194Srgrimes		gzip -9 >${MOUNT}/inst2.cpio.gz)
3261194Srgrimes	install -c -o root -g wheel -m 755 etc.i386/cpio.rc \
3271194Srgrimes	    ${MOUNT}/rc
3281194Srgrimes	install -c -o root -g wheel -m 755 etc.i386/cpio.install \
329284Srgrimes	    ${MOUNT}/install
3301194Srgrimes	install -c -o root -g wheel -m 755 etc.i386/cpio.magic \
3311194Srgrimes	    ${MOUNT}/magic
332284Srgrimes	df -ik ${MOUNT}
3331027Sache	umount /dev/${FLOPPY}
3341027Sache	fsck /dev/r${FLOPPY}
3351205Srgrimes	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/cpio.flp \
336358Srgrimes		bs=15b count=160
3371205Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/cpio.flp \
3381205Srgrimes		>${RELEASEDIR}/floppies/cpio.flp.gz
339284Srgrimes
340372Srgrimesbin-tarball:
341372Srgrimes	(cd ${DESTDIR}; \
342538Srgrimes		tar cf - . | \
343538Srgrimes		gzip --no-name -9 -c | \
344538Srgrimes		split -b 240640 - \
345538Srgrimes		${RELEASEDIR}/tarballs/bin_tgz.)
346372Srgrimes
347538Srgrimessrcbase-tarball:
348376Srgrimes	(cd ${DESTDIR}; \
349538Srgrimes		tar -cf - usr/src/[A-Z]* | \
350538Srgrimes		gzip --no-name -9 -c | \
351538Srgrimes		split -b 240640 - \
352538Srgrimes		${RELEASEDIR}/tarballs/srcbase_tgz.)
353376Srgrimes
354538Srgrimessrcbin-tarball:
355376Srgrimes	(cd ${DESTDIR}; \
356538Srgrimes		tar -cf - usr/src/bin | \
357538Srgrimes		gzip --no-name -9 -c | \
358538Srgrimes		split -b 240640 - \
359538Srgrimes		${RELEASEDIR}/tarballs/srcbin_tgz.)
360376Srgrimes
361538Srgrimessrccontrib-tarball:
362538Srgrimes	(cd ${DESTDIR}; \
363538Srgrimes		tar -cf - usr/src/contrib | \
364538Srgrimes		gzip --no-name -9 -c | \
365538Srgrimes		split -b 240640 - \
366538Srgrimes		${RELEASEDIR}/tarballs/srccontrib_tgz.)
367538Srgrimes
368538Srgrimessrcetc-tarball:
369538Srgrimes	(cd ${DESTDIR}; \
370538Srgrimes		tar -cf - usr/src/etc | \
371538Srgrimes		gzip --no-name -9 -c | \
372538Srgrimes		split -b 240640 - \
373538Srgrimes		${RELEASEDIR}/tarballs/srcetc_tgz.)
374538Srgrimes
375538Srgrimessrcgames-tarball:
376538Srgrimes	(cd ${DESTDIR}; \
377538Srgrimes		tar -cf - usr/src/games | \
378538Srgrimes		gzip --no-name -9 -c | \
379538Srgrimes		split -b 240640 - \
380538Srgrimes		${RELEASEDIR}/tarballs/srcgames_tgz.)
381538Srgrimes
382538Srgrimessrcgnu-tarball:
383538Srgrimes	(cd ${DESTDIR}; \
384538Srgrimes		tar -cf - usr/src/gnu | \
385538Srgrimes		gzip --no-name -9 -c | \
386538Srgrimes		split -b 240640 - \
387538Srgrimes		${RELEASEDIR}/tarballs/srcgnu_tgz.)
388538Srgrimes
389538Srgrimessrcinclude-tarball:
390538Srgrimes	(cd ${DESTDIR}; \
391538Srgrimes		tar -cf - usr/src/include | \
392538Srgrimes		gzip --no-name -9 -c | \
393538Srgrimes		split -b 240640 - \
394538Srgrimes		${RELEASEDIR}/tarballs/srcinclude_tgz.)
395538Srgrimes
396538Srgrimessrclib-tarball:
397538Srgrimes	(cd ${DESTDIR}; \
398538Srgrimes		tar --exclude usr/src/${CRYPT_LIB} -cf - usr/src/lib | \
399538Srgrimes		gzip --no-name -9 -c | \
400538Srgrimes		split -b 240640 - \
401538Srgrimes		${RELEASEDIR}/tarballs/srclib_tgz.)
402538Srgrimes
403538Srgrimessrclibcrypt-tarball:
404538Srgrimes	(cd ${DESTDIR}; \
405538Srgrimes		tar -cf - usr/src/${CRYPT_LIB} | \
406538Srgrimes		gzip --no-name -9 -c | \
407538Srgrimes		split -b 240640 - \
408538Srgrimes		${RELEASEDIR}/tarballs/srclibcrypt_tgz.)
409538Srgrimes
410538Srgrimessrclibexec-tarball:
411538Srgrimes	(cd ${DESTDIR}; \
412538Srgrimes		tar -cf - usr/src/libexec | \
413538Srgrimes		gzip --no-name -9 -c | \
414538Srgrimes		split -b 240640 - \
415538Srgrimes		${RELEASEDIR}/tarballs/srclibexec_tgz.)
416538Srgrimes
417538Srgrimessrcsbin-tarball:
418538Srgrimes	(cd ${DESTDIR}; \
419538Srgrimes		tar -cf - usr/src/sbin | \
420538Srgrimes		gzip --no-name -9 -c | \
421538Srgrimes		split -b 240640 - \
422538Srgrimes		${RELEASEDIR}/tarballs/srcsbin_tgz.)
423538Srgrimes
424538Srgrimessrcshare-tarball:
425538Srgrimes	(cd ${DESTDIR}; \
426538Srgrimes		tar -cf - usr/src/share | \
427538Srgrimes		gzip --no-name -9 -c | \
428538Srgrimes		split -b 240640 - \
429538Srgrimes		${RELEASEDIR}/tarballs/srcshare_tgz.)
430538Srgrimes
431538Srgrimessrcsys-tarball:
432538Srgrimes	(cd ${DESTDIR}; \
433538Srgrimes		tar -cf - usr/src/sys | \
434538Srgrimes		gzip --no-name -9 -c | \
435538Srgrimes		split -b 240640 - \
436538Srgrimes		${RELEASEDIR}/tarballs/srcsys_tgz.)
437538Srgrimes
438538Srgrimessrcusrbin-tarball:
439538Srgrimes	(cd ${DESTDIR}; \
440538Srgrimes		tar -cf - usr/src/usr.bin | \
441538Srgrimes		gzip --no-name -9 -c | \
442538Srgrimes		split -b 240640 - \
443538Srgrimes		${RELEASEDIR}/tarballs/srcusrbin_tgz.)
444538Srgrimes
445538Srgrimessrcusrsbin-tarball:
446538Srgrimes	(cd ${DESTDIR}; \
447538Srgrimes		tar -cf - usr/src/usr.sbin | \
448538Srgrimes		gzip --no-name -9 -c | \
449538Srgrimes		split -b 240640 - \
450538Srgrimes		${RELEASEDIR}/tarballs/srcusrsbin_tgz.)
451538Srgrimes
452538Srgrimessrc-tarball: srcbase-tarball srcbin-tarball srccontrib-tarball srcetc-tarball \
453538Srgrimes	srcgames-tarball srcgnu-tarball srcinclude-tarball srclib-tarball \
454538Srgrimes	srclibcrypt-tarball srclibexec-tarball srcsbin-tarball \
455538Srgrimes	srcshare-tarball srcsys-tarball srcusrbin-tarball \
456538Srgrimes	srcusrsbin-tarball
457538Srgrimes
458372Srgrimesdes-tarball:
459372Srgrimes	rm -rf ${RELEASEDIR}/tmpdes
460372Srgrimes	mkdir ${RELEASEDIR}/tmpdes
461372Srgrimes	for i in ${CRYPT_DIRS}; do \
462372Srgrimes		cd ${RELEASEDIR}/tmpdes; \
463372Srgrimes		mkdir $$i; \
464372Srgrimes		chown ${BINOWN}.${GRPOWN} $$i; \
465372Srgrimes		chmod 755 $$i; \
466372Srgrimes	done
467372Srgrimes	# This is ugly, it force installs a /usr/lib/libcrypt.a so
468372Srgrimes	# that the other makes will be built with des.
469372Srgrimes	#
470372Srgrimes	(cd ${.CURDIR}/../${CRYPT_LIB}; \
471372Srgrimes		unset NOCRYPT; \
472372Srgrimes		DESTDIR=; export DESTDIR; \
473372Srgrimes		${MAKE} cleandir obj depend all install; \
474372Srgrimes		NOMAN=noman; export NOMAN; \
475372Srgrimes		DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
476372Srgrimes		${MAKE} cleandir obj depend all install)
477372Srgrimes	for i in ${CRYPT_SRCS}; do \
478372Srgrimes		unset NOCRYPT; \
479372Srgrimes		DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
480372Srgrimes		NOMAN=noman; export NOMAN; \
481372Srgrimes		cd ${.CURDIR}/../$$i; \
482372Srgrimes		${MAKE} cleandir obj depend all install; \
483372Srgrimes	done
484372Srgrimes	(cd ${RELEASEDIR}/tmpdes; \
485538Srgrimes		tar cf - . | \
486538Srgrimes			gzip --no-name -9 -c | \
487372Srgrimes			split -b 240640 - \
488436Srgrimes			${RELEASEDIR}/tarballs/des_tgz.)
489372Srgrimes	rm -rf ${RELEASEDIR}/tmpdes
490372Srgrimes
491147Srgrimesdistrib-dirs:
492238Sroot	mtree -u -f mtree/BSD.root.dist -p ${DESTDIR}/
493147Srgrimes	mtree -u -f mtree/BSD.var.dist -p ${DESTDIR}/var
494147Srgrimes	mtree -u -f mtree/BSD.usr.dist -p ${DESTDIR}/usr
495372Srgrimes.if defined(CDROMDIST)
496372Srgrimes	mtree -u -f mtree/BSD.local.dist -p ${DESTDIR}/usr/local
497372Srgrimes.endif
498410Srgrimes	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
499147Srgrimes
5001205Srgrimesfloppies: kcopy_ah.flp kcopy_bt.flp filesyst.flp \
5011205Srgrimes	  cpio.flp
502372Srgrimes
5031195Srgrimesrelease: release-dirs distribution kcopy-kernels floppies \
504376Srgrimes	 bin-tarball des-tarball
505372Srgrimes	
506372Srgrimesrelease-dirs:
507994Srgrimes	rm -rf ${RELEASEDIR}/filesys
508994Srgrimes	mkdir ${RELEASEDIR}/filesys
509994Srgrimes	chown root.wheel ${RELEASEDIR}/filesys
510994Srgrimes	chmod 755 ${RELEASEDIR}/filesys
511372Srgrimes	rm -rf ${RELEASEDIR}/tarballs
512372Srgrimes	mkdir ${RELEASEDIR}/tarballs
513372Srgrimes	chown root.wheel ${RELEASEDIR}/tarballs
514372Srgrimes	chmod 755 ${RELEASEDIR}/tarballs
515372Srgrimes	rm -rf ${RELEASEDIR}/floppies
516372Srgrimes	mkdir ${RELEASEDIR}/floppies
517372Srgrimes	chown root.wheel ${RELEASEDIR}/floppies
518372Srgrimes	chmod 755 ${RELEASEDIR}/floppies
519372Srgrimes
52037Srgrimes.include <bsd.prog.mk>
521