Makefile revision 412
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
2137SrgrimesMTREE=	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
28284SrgrimesCOPYRIGHT= COPYRIGHT
29355SrgrimesFREEBSD= CONTRIB.386BSD CONTRIB.FreeBSD RELNOTES.FreeBSD ${COPYRIGHT}
30277Srgrimes#
31277Srgrimes# Floppy drive name and files for building FreeBSD Floppies
32284SrgrimesFLOPPY?=	fd0
33284SrgrimesMOUNT=		/mnt
34284Srgrimes#
35284SrgrimesMDEC=		usr/mdec/bootfd usr/mdec/fdboot
36284SrgrimesMDEC+=		usr/mdec/bootsd usr/mdec/sdboot
37284SrgrimesMDEC+=		usr/mdec/bootwd usr/mdec/wdboot
38284Srgrimes#
39284SrgrimesKC_DIRS=	dev mnt
40284SrgrimesKC_FILES=	${COPYRIGHT}
41284SrgrimesKC_FILES+=	bin/[ bin/cp bin/echo bin/sh bin/test
42284SrgrimesKC_FILES+=	sbin/fsck sbin/halt sbin/init sbin/mount sbin/umount
43284Srgrimes#
44358SrgrimesFILESYSTEM_DIRS=	bin dev etc mnt sbin usr usr/bin usr/mdec usr/sbin
45358SrgrimesFILESYSTEM_TREES=	dev
46358SrgrimesFILESYSTEM_FILES=	${COPYRIGHT}
47412SalmFILESYSTEM_FILES+=	bin/[ bin/expr bin/ls bin/mkdir
48358SrgrimesFILESYSTEM_FILES+=	bin/sh bin/sync bin/test
49412SalmFILESYSTEM_FILES+=	dev/MAKEDEV
50358SrgrimesFILESYSTEM_FILES+=	etc/group
51358SrgrimesFILESYSTEM_FILES+=	etc/master.passwd etc/passwd etc/pwd.db etc/spwd.db
52358SrgrimesFILESYSTEM_FILES+=	sbin/disklabel sbin/halt sbin/init
53358SrgrimesFILESYSTEM_FILES+=	sbin/mount sbin/mount_isofs sbin/mount_pcfs
54358SrgrimesFILESYSTEM_FILES+=	sbin/newfs
55358SrgrimesFILESYSTEM_FILES+=	sbin/umount
56412SalmFILESYSTEM_FILES+=	sbin/fdisk
57358SrgrimesFILESYSTEM_FILES+=	usr/bin/cpio
58358SrgrimesFILESYSTEM_FILES+=	${MDEC}
59358SrgrimesFILESYSTEM_FILES+=	usr/sbin/bad144
60263Srgrimes
61358SrgrimesCPIO_FILES=	${COPYRIGHT}
62358SrgrimesCPIO_FILES+=	usr/bin/gunzip usr/bin/gzcat usr/bin/gzip usr/bin/zcat
63372SrgrimesCPIO_CPIO=	bin/chmod bin/cp bin/dd bin/mv bin/pwd bin/rm bin/stty
64358SrgrimesCPIO_CPIO+=	etc/protocols etc/services
65358SrgrimesCPIO_CPIO+=	sbin/ifconfig sbin/fsck sbin/mknod
66372SrgrimesCPIO_CPIO+=	sbin/route sbin/slattach
67358SrgrimesCPIO_CPIO+=	tmp
68358SrgrimesCPIO_CPIO+=	usr/bin/awk usr/bin/chgrp usr/bin/ftp
69358SrgrimesCPIO_CPIO+=	usr/bin/more usr/bin/tar usr/bin/tip
70358SrgrimesCPIO_CPIO+=	usr/bin/elvis usr/bin/ex usr/bin/vi usr/bin/view
71358SrgrimesCPIO_CPIO+=	usr/sbin/update usr/sbin/chown
72358SrgrimesCPIO_CPIO+=	var
73284Srgrimes
74412SalmDOS_FILES=	bin/cat bin/dd bin/df bin/ed
75412SalmDOS_FILES+=	usr/bin/cksum usr/bin/mt 
76412SalmDOS_FILES+=	sbin/mknod sbin/ping sbin/shutdown sbin/st sbin/reboot
77412Salm
78347SrgrimesCRYPT_LIB=	lib/libcrypt
79372SrgrimesCRYPT_SRCS=	bin/ed bin/rcp
80372SrgrimesCRYPT_SRCS+=	libexec/ftpd libexec/makekey libexec/rexecd libexec/rlogind
81372SrgrimesCRYPT_SRCS+=	libexec/rshd libexec/telnetd libexec/uucpd
82372SrgrimesCRYPT_SRCS+=	usr.bin/bdes usr.bin/lock usr.bin/login usr.bin/passwd
83372SrgrimesCRYPT_SRCS+=	usr.bin/rlogin usr.bin/rsh usr.bin/su usr.bin/telnet
84372SrgrimesCRYPT_DIRS=	bin usr usr/bin usr/lib usr/libexec 
85347Srgrimes
8637Srgrimesall clean cleandir depend etc install lint:
8737Srgrimes
88347Srgrimescrypt:
89347Srgrimes	rm -f ${LIBCRYPT};
90347Srgrimes	(cd ${.CURDIR}/../${CRYPT_LIB}; \
91355Srgrimes		${MAKE} cleandir obj depend all install)
92372Srgrimes	for i in ${CRYPT_SRCS}; do \
93347Srgrimes		cd ${.CURDIR}/../$$i; \
94355Srgrimes		${MAKE} cleandir obj depend all; \
95347Srgrimes	done
96347Srgrimes	
97347Srgrimesnon-crypt:
98347Srgrimes	rm -f ${LIBCRYPT}
99372Srgrimes	for i in ${CRYPT_SRCS}; do \
100347Srgrimes		cd ${.CURDIR}/../$$i; \
101355Srgrimes		${MAKE} cleandir obj depend all; \
102347Srgrimes	done
103347Srgrimes	
104147Srgrimesdistribution: distrib-dirs
10537Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
10637Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc
107147Srgrimes	install -c -o root -g wheel -m 755 ${BIN3} ${DESTDIR}/etc
108147Srgrimes	install -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root
109238Sroot	install -c -o root -g wheel -m 600 /dev/null ${DESTDIR}/var/cron/log
11037Srgrimes	install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
111358Srgrimes	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
11237Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
11337Srgrimes	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
114347Srgrimes.if defined(CDROMDIST)
115147Srgrimes	(cd ${DESTDIR}/dev; sh MAKEDEV all)
116347Srgrimes.endif
11737Srgrimes	(cd root; \
11837Srgrimes		install -c -o root -g wheel -m 644 dot.cshrc \
11937Srgrimes		    ${DESTDIR}/root/.cshrc; \
12037Srgrimes		install -c -o root -g wheel -m 644 dot.klogin \
12137Srgrimes		    ${DESTDIR}/root/.klogin; \
12237Srgrimes		install -c -o root -g wheel -m 644 dot.login \
12337Srgrimes		    ${DESTDIR}/root/.login; \
12437Srgrimes		install -c -o root -g wheel -m 644 dot.profile \
12537Srgrimes		    ${DESTDIR}/root/.profile; \
12637Srgrimes		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
12737Srgrimes		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
12837Srgrimes		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
12937Srgrimes	cd mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${MTREE} \
13037Srgrimes	    ${DESTDIR}/etc/mtree
13137Srgrimes	cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
13237Srgrimes	    ${DESTDIR}/etc/namedb
13337Srgrimes	install -c -o ${BINOWN} -g operator -m 664 /dev/null \
13437Srgrimes	    ${DESTDIR}/etc/dumpdates
135147Srgrimes	install -c -o nobody -g ${BINGRP} -m 664 /dev/null \
136147Srgrimes	    ${DESTDIR}/var/db/locate.database
13737Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
138147Srgrimes	    ${DESTDIR}/var/log/lpd-errs
13937Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
14037Srgrimes	    ${DESTDIR}/var/log/maillog
14137Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
142288Srgrimes	    ${DESTDIR}/var/log/lastlog
143288Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
144147Srgrimes	    ${DESTDIR}/var/log/messages
14537Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
146147Srgrimes	    ${DESTDIR}/var/log/wtmp
147147Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
14837Srgrimes	    ${DESTDIR}/var/run/utmp
14937Srgrimes	(cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
150147Srgrimes	    fstab.* ${DESTDIR}/etc)
151347Srgrimes.if defined(NOCRYPT)
152355Srgrimes	${MAKE} non-crypt
153355Srgrimes	(cd ..; NOCRYPT=nocrypt; export NOCRYPT; ${MAKE} install)
154347Srgrimes.else
155355Srgrimes	${MAKE} crypt
156355Srgrimes	(cd ..; ${MAKE} install)
157347Srgrimes.endif
158277Srgrimes	(cd ../usr.sbin/sendmail/src; \
159355Srgrimes	    ${MAKE} install; \
160277Srgrimes	 cd ../cf/cf; \
161355Srgrimes	    ${MAKE} tcpproto.cf; \
162238Sroot	    install -o root -g wheel -m 644 tcpproto.cf \
163238Sroot	        ${DESTDIR}/etc/sendmail.cf)
164277Srgrimes	(cd ../; \
165277Srgrimes	    install -c -o root -g wheel -m 444 ${FREEBSD} ${DESTDIR}/)
166355Srgrimes	(cd ..; ${MAKE} mdec; )
167333Srgrimes.if ${MACHINE} == "tahoe"
168333Srgrimes	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \
169333Srgrimes	    ${DESTDIR}/)
170168Srgrimes.endif
171333Srgrimes.if ${MACHINE} == "vax"
172333Srgrimes	(cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
173333Srgrimes	    ${DESTDIR}/)
174333Srgrimes.endif
17537Srgrimes
17637Srgrimeshcx9-distribution:
17737Srgrimes	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \
17837Srgrimes	    ${DESTDIR}/)
17937Srgrimes
180358Srgrimeskcopy-kernels: ../sys/i386/conf/GENERICAH ../sys/i386/conf/GENERICBT
181320Srgrimes	(cd ../sys/compile; rm -rf GENERICAH GENERICBT)
182320Srgrimes	(cd ../sys/i386/conf; config GENERICAH; config GENERICBT)
183355Srgrimes	(cd ../sys/compile/GENERICAH; ${MAKE} depend; ${MAKE} all; \
184320Srgrimes	    install -c -o root -g wheel -m 755 386bsd \
185320Srgrimes	        ${DESTDIR}/386bsd.GENERICAH)
186355Srgrimes	(cd ../sys/compile/GENERICBT; ${MAKE} depend; ${MAKE} all; \
187320Srgrimes	    install -c -o root -g wheel -m 755 386bsd \
188320Srgrimes	        ${DESTDIR}/386bsd.GENERICBT)
189320Srgrimes
190358Srgrimeskcopy-floppy:
191277Srgrimes	disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd
192277Srgrimes	newfs -b 4096 -c 80 -f 512 -i 16384 -m 0 -o space r${FLOPPY}a floppy5
193277Srgrimes	mount /dev/${FLOPPY}a ${MOUNT}
194333Srgrimes	chown root.wheel ${MOUNT}/.
195333Srgrimes	chmod 755 ${MOUNT}/.
196284Srgrimes	(cd ${DESTDIR}/; \
197320Srgrimes	    ls -d ${KC_DIRS} | cpio -pdamuv ${MOUNT})
198277Srgrimes	(cd ${MOUNT}/dev; \
199277Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV std; \
200277Srgrimes	    rm -rf fd; \
201333Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0 sd1)
202284Srgrimes	(cd ${DESTDIR}/; \
203320Srgrimes	    ls ${KC_FILES} | cpio -pdamuv ${MOUNT})
204277Srgrimes	install -c -o root -g wheel -m 755 etc.i386/kc.profile \
205277Srgrimes	    ${MOUNT}/.profile
206320Srgrimes
207372Srgrimeskcopy-ah-floppy:
208372Srgrimes	${MAKE} kcopy-floppy
209320Srgrimes	(cd ../sys/compile/GENERICAH; \
210277Srgrimes	    install -c -o root -g wheel -m 755 386bsd ${MOUNT}/)
211277Srgrimes	df -ik ${MOUNT}
212277Srgrimes	umount /dev/${FLOPPY}a
213277Srgrimes	fsck /dev/r${FLOPPY}a
214372Srgrimes	dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/kcopy-ah-floppy \
215358Srgrimes		bs=15b count=160
216372Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy-ah-floppy \
217372Srgrimes		>${RELEASEDIR}/floppies/kcopy-ah-floppy.gz
218277Srgrimes
219372Srgrimeskcopy-bt-floppy:
220372Srgrimes	${MAKE} kcopy-floppy
221320Srgrimes	(cd ../sys/compile/GENERICBT; \
222320Srgrimes	    install -c -o root -g wheel -m 755 386bsd ${MOUNT}/)
223320Srgrimes	df -ik ${MOUNT}
224320Srgrimes	umount /dev/${FLOPPY}a
225320Srgrimes	fsck /dev/r${FLOPPY}a
226372Srgrimes	dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/kcopy-bt-floppy \
227358Srgrimes		bs=15b count=160
228372Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy-bt-floppy \
229372Srgrimes		>${RELEASEDIR}/floppies/kcopy-bt-floppy.gz
230320Srgrimes
231358Srgrimesfilesystem-floppy:
232284Srgrimes	disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd
233284Srgrimes	newfs -b 4096 -c 80 -f 512 -i 10240 -m 0 -o space r${FLOPPY}a floppy5
234284Srgrimes	mount /dev/${FLOPPY}a ${MOUNT}
235333Srgrimes	chown root.wheel ${MOUNT}/.
236333Srgrimes	chmod 755 ${MOUNT}/.
237284Srgrimes	(cd ${DESTDIR}/; \
238358Srgrimes	    ls -d ${FILESYSTEM_DIRS} | cpio -pdamuv ${MOUNT})
239284Srgrimes	(cd ${MOUNT}/dev; \
240284Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV std; \
241284Srgrimes	    rm -rf fd; \
242412Salm	    sh ${DESTDIR}/dev/MAKEDEV fd0 fd1 wd0 sd0 sd1
243412Salm	    rm -f ${DESTDIR}/dev/rfd1[b-z] ${DESTDIR}/dev/fd1[b-z])
244284Srgrimes	(cd ${DESTDIR}/; \
245358Srgrimes	    ls ${FILESYSTEM_FILES} | cpio -pdamuv ${MOUNT})
246284Srgrimes	install -c -o root -g wheel -m 755 etc.i386/inst1.profile \
247284Srgrimes	    ${MOUNT}/.profile
248284Srgrimes	install -c -o root -g wheel -m 755 etc.i386/inst1.install \
249284Srgrimes	    ${MOUNT}/install
250284Srgrimes	(cd ${MOUNT}/; \
251358Srgrimes	    ls ${FILESYSTEM_FILES} >/tmp/filelist; \
252358Srgrimes	    ls -d ${FILESYSTEM_DIRS} >>/tmp/filelist; \
253358Srgrimes	    find ${FILESYSTEM_TREES} >>/tmp/filelist; \
254333Srgrimes	    sort -u /tmp/filelist >filelist; \
255333Srgrimes	    rm /tmp/filelist)
256284Srgrimes	df -ik ${MOUNT}
257284Srgrimes	umount /dev/${FLOPPY}a
258284Srgrimes	fsck /dev/r${FLOPPY}a
259372Srgrimes	dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/filesystem-floppy \
260358Srgrimes		bs=15b count=160
261372Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/filesystem-floppy \
262372Srgrimes		>${RELEASEDIR}/floppies/filesystem-floppy.gz
263284Srgrimes
264358Srgrimescpio-floppy:
265284Srgrimes	disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd
266284Srgrimes	newfs -b 4096 -c 80 -f 512 -i 65536 -m 0 -o space r${FLOPPY}a floppy5
267284Srgrimes	mount /dev/${FLOPPY}a ${MOUNT}
268333Srgrimes	chown root.wheel ${MOUNT}/.
269333Srgrimes	chmod 755 ${MOUNT}/.
270284Srgrimes	(cd ${DESTDIR}/; \
271358Srgrimes		ls ${CPIO_FILES} | cpio -pdamuv ${MOUNT})
272284Srgrimes	(cd ${DESTDIR}/; \
273358Srgrimes	    find ${CPIO_CPIO} | cpio -oav | gzip -9 >${MOUNT}/inst2.cpio.gz)
274284Srgrimes	install -c -o root -g wheel -m 755 etc.i386/inst2.profile \
275284Srgrimes	    ${MOUNT}/.profile
276284Srgrimes	install -c -o root -g wheel -m 755 etc.i386/inst2.install \
277284Srgrimes	    ${MOUNT}/install
278284Srgrimes	df -ik ${MOUNT}
279284Srgrimes	umount /dev/${FLOPPY}a
280284Srgrimes	fsck /dev/r${FLOPPY}a
281372Srgrimes	dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/cpio-floppy \
282358Srgrimes		bs=15b count=160
283372Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/cpio-floppy \
284372Srgrimes		>${RELEASEDIR}/floppies/cpio-floppy.gz
285284Srgrimes
286412Salmdos-floppy:
287412Salm	mount -t pcfs /dev/${FLOPPY}a ${MOUNT}
288412Salm	(cd ${DESTDIR}/; \
289412Salm		cp /sys/i386/floppy/* ${MOUNT}; \
290412Salm		cp ${DOS_FILES} ${MOUNT})
291412Salm	df -ik ${MOUNT}
292412Salm	umount /dev/${FLOPPY}a
293412Salm	dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/dos-floppy \
294412Salm		bs=15b count=160
295412Salm	gzip --no-name -9 -c ${RELEASEDIR}/floppies/dos-floppy \
296412Salm		>${RELEASEDIR}/floppies/dos-floppy.gz
297412Salm
298372Srgrimesbin-tarball:
299372Srgrimes	(cd ${DESTDIR}; \
300372Srgrimes		tar cf - . | gzip --no-name -9 -c | \
301372Srgrimes			split -b 240640 - \
302372Srgrimes			${RELEASEDIR}/tarballs/bin.tar.gz.)
303372Srgrimes
304376Srgrimessrc-tarball:
305376Srgrimes	(cd ${DESTDIR}; \
306376Srgrimes		tar --exclude usr/src/${CRYPT_LIB} -cf - usr/src | gzip --no-name -9 -c | \
307376Srgrimes			split -b 240640 - \
308376Srgrimes			${RELEASEDIR}/tarballs/src.tar.gz.)
309376Srgrimes
310376Srgrimesssrc-tarball:
311376Srgrimes	(cd ${DESTDIR}; \
312376Srgrimes		tar -cf - usr/src/${CRYPT_LIB} | gzip --no-name -9 -c | \
313376Srgrimes			split -b 240640 - \
314376Srgrimes			${RELEASEDIR}/tarballs/ssrc.tar.gz.)
315376Srgrimes
316372Srgrimesdes-tarball:
317372Srgrimes	rm -rf ${RELEASEDIR}/tmpdes
318372Srgrimes	mkdir ${RELEASEDIR}/tmpdes
319372Srgrimes	for i in ${CRYPT_DIRS}; do \
320372Srgrimes		cd ${RELEASEDIR}/tmpdes; \
321372Srgrimes		mkdir $$i; \
322372Srgrimes		chown ${BINOWN}.${GRPOWN} $$i; \
323372Srgrimes		chmod 755 $$i; \
324372Srgrimes	done
325372Srgrimes	# This is ugly, it force installs a /usr/lib/libcrypt.a so
326372Srgrimes	# that the other makes will be built with des.
327372Srgrimes	#
328372Srgrimes	(cd ${.CURDIR}/../${CRYPT_LIB}; \
329372Srgrimes		unset NOCRYPT; \
330372Srgrimes		DESTDIR=; export DESTDIR; \
331372Srgrimes		${MAKE} cleandir obj depend all install; \
332372Srgrimes		NOMAN=noman; export NOMAN; \
333372Srgrimes		DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
334372Srgrimes		${MAKE} cleandir obj depend all install)
335372Srgrimes	for i in ${CRYPT_SRCS}; do \
336372Srgrimes		unset NOCRYPT; \
337372Srgrimes		DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
338372Srgrimes		NOMAN=noman; export NOMAN; \
339372Srgrimes		cd ${.CURDIR}/../$$i; \
340372Srgrimes		${MAKE} cleandir obj depend all install; \
341372Srgrimes	done
342372Srgrimes	(cd ${RELEASEDIR}/tmpdes; \
343372Srgrimes		tar cf - . | gzip --no-name -9 -c | \
344372Srgrimes			split -b 240640 - \
345372Srgrimes			${RELEASEDIR}/tarballs/des.tar.gz.)
346372Srgrimes	rm -rf ${RELEASEDIR}/tmpdes
347372Srgrimes
348147Srgrimesdistrib-dirs:
349238Sroot	mtree -u -f mtree/BSD.root.dist -p ${DESTDIR}/
350147Srgrimes	mtree -u -f mtree/BSD.var.dist -p ${DESTDIR}/var
351147Srgrimes	mtree -u -f mtree/BSD.usr.dist -p ${DESTDIR}/usr
352372Srgrimes.if defined(CDROMDIST)
353372Srgrimes	mtree -u -f mtree/BSD.local.dist -p ${DESTDIR}/usr/local
354372Srgrimes.endif
355410Srgrimes	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
356147Srgrimes
357372Srgrimesfloppies: kcopy-ah-floppy kcopy-bt-floppy filesystem-floppy \
358372Srgrimes	  cpio-floppy
359372Srgrimes
360376Srgrimesrelease: release-dirs distribution kcopy-kernels floppies \
361376Srgrimes	 bin-tarball des-tarball
362372Srgrimes	
363372Srgrimesrelease-dirs:
364372Srgrimes	rm -rf ${RELEASEDIR}/filesystem
365372Srgrimes	mkdir ${RELEASEDIR}/filesystem
366372Srgrimes	chown root.wheel ${RELEASEDIR}/filesystem
367372Srgrimes	chmod 755 ${RELEASEDIR}/filesystem
368372Srgrimes	rm -rf ${RELEASEDIR}/tarballs
369372Srgrimes	mkdir ${RELEASEDIR}/tarballs
370372Srgrimes	chown root.wheel ${RELEASEDIR}/tarballs
371372Srgrimes	chmod 755 ${RELEASEDIR}/tarballs
372372Srgrimes	rm -rf ${RELEASEDIR}/floppies
373372Srgrimes	mkdir ${RELEASEDIR}/floppies
374372Srgrimes	chown root.wheel ${RELEASEDIR}/floppies
375372Srgrimes	chmod 755 ${RELEASEDIR}/floppies
376372Srgrimes
37737Srgrimes.include <bsd.prog.mk>
378