Makefile revision 1130
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#
42284SrgrimesKC_DIRS=	dev mnt
43284SrgrimesKC_FILES=	${COPYRIGHT}
44284SrgrimesKC_FILES+=	bin/[ bin/cp bin/echo bin/sh bin/test
45284SrgrimesKC_FILES+=	sbin/fsck sbin/halt sbin/init sbin/mount sbin/umount
46284Srgrimes#
47358SrgrimesFILESYSTEM_DIRS=	bin dev etc mnt sbin usr usr/bin usr/mdec usr/sbin
48358SrgrimesFILESYSTEM_TREES=	dev
49358SrgrimesFILESYSTEM_FILES=	${COPYRIGHT}
50452SrgrimesFILESYSTEM_FILES+=	bin/[ bin/expr bin/ls bin/mkdir bin/rm
51358SrgrimesFILESYSTEM_FILES+=	bin/sh bin/sync bin/test
52412SalmFILESYSTEM_FILES+=	dev/MAKEDEV
53358SrgrimesFILESYSTEM_FILES+=	etc/group
54452SrgrimesFILESYSTEM_FILES+=	etc/master.passwd etc/passwd etc/pwd.db
55358SrgrimesFILESYSTEM_FILES+=	sbin/disklabel sbin/halt sbin/init
56452SrgrimesFILESYSTEM_FILES+=	sbin/mount sbin/mount_pcfs
57358SrgrimesFILESYSTEM_FILES+=	sbin/newfs
58358SrgrimesFILESYSTEM_FILES+=	sbin/umount
59412SalmFILESYSTEM_FILES+=	sbin/fdisk
60358SrgrimesFILESYSTEM_FILES+=	usr/bin/cpio
61358SrgrimesFILESYSTEM_FILES+=	${MDEC}
62358SrgrimesFILESYSTEM_FILES+=	usr/sbin/bad144
63263Srgrimes
64358SrgrimesCPIO_FILES=	${COPYRIGHT}
65358SrgrimesCPIO_FILES+=	usr/bin/gunzip usr/bin/gzcat usr/bin/gzip usr/bin/zcat
66452SrgrimesCPIO_CPIO=	bin/chmod bin/cat bin/cp bin/dd bin/df bin/mv bin/pwd bin/stty
67481SalmCPIO_CPIO+=	etc/protocols etc/remote etc/services etc/spwd.db
68452SrgrimesCPIO_CPIO+=	sbin/ifconfig sbin/fsck sbin/mknod sbin/mount_isofs
69452SrgrimesCPIO_CPIO+=	sbin/reboot sbin/route sbin/slattach
70358SrgrimesCPIO_CPIO+=	usr/bin/awk usr/bin/chgrp usr/bin/ftp
71358SrgrimesCPIO_CPIO+=	usr/bin/more usr/bin/tar usr/bin/tip
72358SrgrimesCPIO_CPIO+=	usr/bin/elvis usr/bin/ex usr/bin/vi usr/bin/view
73358SrgrimesCPIO_CPIO+=	usr/sbin/update usr/sbin/chown
74813SrgrimesCPIO_CPIO_DIRS=	tmp var var/tmp var/run var/spool var/spool/lock
75284Srgrimes
76347SrgrimesCRYPT_LIB=	lib/libcrypt
77372SrgrimesCRYPT_SRCS=	bin/ed bin/rcp
78372SrgrimesCRYPT_SRCS+=	libexec/ftpd libexec/makekey libexec/rexecd libexec/rlogind
79372SrgrimesCRYPT_SRCS+=	libexec/rshd libexec/telnetd libexec/uucpd
801126SrgrimesCRYPT_SRCS+=	sbin/init.bsdi
81372SrgrimesCRYPT_SRCS+=	usr.bin/bdes usr.bin/lock usr.bin/login usr.bin/passwd
82372SrgrimesCRYPT_SRCS+=	usr.bin/rlogin usr.bin/rsh usr.bin/su usr.bin/telnet
831126SrgrimesCRYPT_DIRS=	bin sbin usr usr/bin usr/lib usr/libexec 
84347Srgrimes
8537Srgrimesall clean cleandir depend etc install lint:
8637Srgrimes
87347Srgrimescrypt:
88347Srgrimes	rm -f ${LIBCRYPT};
89347Srgrimes	(cd ${.CURDIR}/../${CRYPT_LIB}; \
90355Srgrimes		${MAKE} cleandir obj depend all install)
91372Srgrimes	for i in ${CRYPT_SRCS}; do \
92347Srgrimes		cd ${.CURDIR}/../$$i; \
93355Srgrimes		${MAKE} cleandir obj depend all; \
94347Srgrimes	done
95347Srgrimes	
96347Srgrimesnon-crypt:
97347Srgrimes	rm -f ${LIBCRYPT}
98372Srgrimes	for i in ${CRYPT_SRCS}; do \
99347Srgrimes		cd ${.CURDIR}/../$$i; \
100355Srgrimes		${MAKE} cleandir obj depend all; \
101347Srgrimes	done
102347Srgrimes	
103147Srgrimesdistribution: distrib-dirs
10437Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
10537Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc
106147Srgrimes	install -c -o root -g wheel -m 755 ${BIN3} ${DESTDIR}/etc
1071014Snate	install -c -o root -g wheel -m 644 crontab ${DESTDIR}/etc
108238Sroot	install -c -o root -g wheel -m 600 /dev/null ${DESTDIR}/var/cron/log
10937Srgrimes	install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
110358Srgrimes	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
11137Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
11237Srgrimes	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
113347Srgrimes.if defined(CDROMDIST)
114147Srgrimes	(cd ${DESTDIR}/dev; sh MAKEDEV all)
115347Srgrimes.endif
11637Srgrimes	(cd root; \
11737Srgrimes		install -c -o root -g wheel -m 644 dot.cshrc \
11837Srgrimes		    ${DESTDIR}/root/.cshrc; \
11937Srgrimes		install -c -o root -g wheel -m 644 dot.klogin \
12037Srgrimes		    ${DESTDIR}/root/.klogin; \
12137Srgrimes		install -c -o root -g wheel -m 644 dot.login \
12237Srgrimes		    ${DESTDIR}/root/.login; \
12337Srgrimes		install -c -o root -g wheel -m 644 dot.profile \
12437Srgrimes		    ${DESTDIR}/root/.profile; \
12537Srgrimes		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
12637Srgrimes		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
12737Srgrimes		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
12837Srgrimes	cd mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${MTREE} \
12937Srgrimes	    ${DESTDIR}/etc/mtree
13037Srgrimes	cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
13137Srgrimes	    ${DESTDIR}/etc/namedb
13237Srgrimes	install -c -o ${BINOWN} -g operator -m 664 /dev/null \
13337Srgrimes	    ${DESTDIR}/etc/dumpdates
134147Srgrimes	install -c -o nobody -g ${BINGRP} -m 664 /dev/null \
135147Srgrimes	    ${DESTDIR}/var/db/locate.database
13637Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
137147Srgrimes	    ${DESTDIR}/var/log/lpd-errs
13837Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
13937Srgrimes	    ${DESTDIR}/var/log/maillog
14037Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
141288Srgrimes	    ${DESTDIR}/var/log/lastlog
142288Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
143147Srgrimes	    ${DESTDIR}/var/log/messages
14437Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
145147Srgrimes	    ${DESTDIR}/var/log/wtmp
146147Srgrimes	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
14737Srgrimes	    ${DESTDIR}/var/run/utmp
14837Srgrimes	(cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
149147Srgrimes	    fstab.* ${DESTDIR}/etc)
150347Srgrimes.if defined(NOCRYPT)
151355Srgrimes	${MAKE} non-crypt
152355Srgrimes	(cd ..; NOCRYPT=nocrypt; export NOCRYPT; ${MAKE} install)
153347Srgrimes.else
154355Srgrimes	${MAKE} crypt
155355Srgrimes	(cd ..; ${MAKE} install)
156347Srgrimes.endif
157277Srgrimes	(cd ../usr.sbin/sendmail/src; \
158355Srgrimes	    ${MAKE} install; \
159277Srgrimes	 cd ../cf/cf; \
1601126Srgrimes	    ${MAKE} obj; \
1611126Srgrimes	    ${MAKE} freefall.cf; \
1621126Srgrimes	    install -o root -g wheel -m 644 freefall.cf \
163238Sroot	        ${DESTDIR}/etc/sendmail.cf)
164277Srgrimes	(cd ../; \
165277Srgrimes	    install -c -o root -g wheel -m 444 ${FREEBSD} ${DESTDIR}/)
166355Srgrimes	(cd ..; ${MAKE} mdec; )
167644Srgrimes	(cd ../share/man; ${MAKE} makedb; )
168333Srgrimes.if ${MACHINE} == "tahoe"
169333Srgrimes	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \
170333Srgrimes	    ${DESTDIR}/)
171168Srgrimes.endif
172333Srgrimes.if ${MACHINE} == "vax"
173333Srgrimes	(cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
174333Srgrimes	    ${DESTDIR}/)
175333Srgrimes.endif
17637Srgrimes
17737Srgrimeshcx9-distribution:
17837Srgrimes	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \
17937Srgrimes	    ${DESTDIR}/)
18037Srgrimes
181358Srgrimeskcopy-kernels: ../sys/i386/conf/GENERICAH ../sys/i386/conf/GENERICBT
182320Srgrimes	(cd ../sys/compile; rm -rf GENERICAH GENERICBT)
183320Srgrimes	(cd ../sys/i386/conf; config GENERICAH; config GENERICBT)
184355Srgrimes	(cd ../sys/compile/GENERICAH; ${MAKE} depend; ${MAKE} all; \
185320Srgrimes	    install -c -o root -g wheel -m 755 386bsd \
186320Srgrimes	        ${DESTDIR}/386bsd.GENERICAH)
187355Srgrimes	(cd ../sys/compile/GENERICBT; ${MAKE} depend; ${MAKE} all; \
188320Srgrimes	    install -c -o root -g wheel -m 755 386bsd \
189320Srgrimes	        ${DESTDIR}/386bsd.GENERICBT)
190320Srgrimes
191358Srgrimeskcopy-floppy:
192568Srgrimes	disklabel -w -r ${FLOPPY} ${FLOPPY_TYPE} \
193568Srgrimes		/usr/mdec/fdboot /usr/mdec/bootfd
194568Srgrimes	newfs -b 4096 -c 80 -f 512 -i 16384 -m 0 -o space \
1951027Sache		r${FLOPPY} ${FLOPPY_TYPE}
1961027Sache	mount /dev/${FLOPPY} ${MOUNT}
197333Srgrimes	chown root.wheel ${MOUNT}/.
198333Srgrimes	chmod 755 ${MOUNT}/.
199284Srgrimes	(cd ${DESTDIR}/; \
200320Srgrimes	    ls -d ${KC_DIRS} | cpio -pdamuv ${MOUNT})
201277Srgrimes	(cd ${MOUNT}/dev; \
202277Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV std; \
203277Srgrimes	    rm -rf fd; \
2041126Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0 sd1; \
2051126Srgrimes	    rm -rf fd0?* rfd0?*;)
206284Srgrimes	(cd ${DESTDIR}/; \
207320Srgrimes	    ls ${KC_FILES} | cpio -pdamuv ${MOUNT})
208277Srgrimes	install -c -o root -g wheel -m 755 etc.i386/kc.profile \
209277Srgrimes	    ${MOUNT}/.profile
210320Srgrimes
211372Srgrimeskcopy-ah-floppy:
212372Srgrimes	${MAKE} kcopy-floppy
213320Srgrimes	(cd ../sys/compile/GENERICAH; \
214277Srgrimes	    install -c -o root -g wheel -m 755 386bsd ${MOUNT}/)
215277Srgrimes	df -ik ${MOUNT}
2161027Sache	umount /dev/${FLOPPY}
2171027Sache	fsck /dev/r${FLOPPY}
2181027Sache	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/kcopy-ah-floppy \
219358Srgrimes		bs=15b count=160
220372Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy-ah-floppy \
221372Srgrimes		>${RELEASEDIR}/floppies/kcopy-ah-floppy.gz
222277Srgrimes
223372Srgrimeskcopy-bt-floppy:
224372Srgrimes	${MAKE} kcopy-floppy
225320Srgrimes	(cd ../sys/compile/GENERICBT; \
226320Srgrimes	    install -c -o root -g wheel -m 755 386bsd ${MOUNT}/)
227320Srgrimes	df -ik ${MOUNT}
2281027Sache	umount /dev/${FLOPPY}
2291027Sache	fsck /dev/r${FLOPPY}
2301027Sache	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/kcopy-bt-floppy \
231358Srgrimes		bs=15b count=160
232372Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy-bt-floppy \
233372Srgrimes		>${RELEASEDIR}/floppies/kcopy-bt-floppy.gz
234320Srgrimes
235358Srgrimesfilesystem-floppy:
236568Srgrimes	disklabel -w -r ${FLOPPY} ${FLOPPY_TYPE} \
237568Srgrimes		/usr/mdec/fdboot /usr/mdec/bootfd
238568Srgrimes	newfs -b 4096 -c 80 -f 512 -i 10240 -m 0 -o space \
2391027Sache		r${FLOPPY}  ${FLOPPY_TYPE}
2401027Sache	mount /dev/${FLOPPY}  ${MOUNT}
241333Srgrimes	chown root.wheel ${MOUNT}/.
242333Srgrimes	chmod 755 ${MOUNT}/.
243284Srgrimes	(cd ${DESTDIR}/; \
244358Srgrimes	    ls -d ${FILESYSTEM_DIRS} | cpio -pdamuv ${MOUNT})
245284Srgrimes	(cd ${MOUNT}/dev; \
246284Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV std; \
247284Srgrimes	    rm -rf fd; \
248435Srgrimes	    sh ${DESTDIR}/dev/MAKEDEV fd0 fd1 wd0 sd0 sd1; \
2491126Srgrimes	    rm -f fd0?* fd1?* rfd0?* rfd1?*)
250284Srgrimes	(cd ${DESTDIR}/; \
251358Srgrimes	    ls ${FILESYSTEM_FILES} | cpio -pdamuv ${MOUNT})
252284Srgrimes	install -c -o root -g wheel -m 755 etc.i386/inst1.profile \
253284Srgrimes	    ${MOUNT}/.profile
254284Srgrimes	install -c -o root -g wheel -m 755 etc.i386/inst1.install \
255284Srgrimes	    ${MOUNT}/install
256284Srgrimes	(cd ${MOUNT}/; \
257358Srgrimes	    ls ${FILESYSTEM_FILES} >/tmp/filelist; \
258358Srgrimes	    ls -d ${FILESYSTEM_DIRS} >>/tmp/filelist; \
259358Srgrimes	    find ${FILESYSTEM_TREES} >>/tmp/filelist; \
260333Srgrimes	    sort -u /tmp/filelist >filelist; \
261333Srgrimes	    rm /tmp/filelist)
262284Srgrimes	df -ik ${MOUNT}
2631027Sache	umount /dev/${FLOPPY}
2641027Sache	fsck /dev/r${FLOPPY}
2651027Sache	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/filesystem-floppy \
266358Srgrimes		bs=15b count=160
267372Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/filesystem-floppy \
268372Srgrimes		>${RELEASEDIR}/floppies/filesystem-floppy.gz
269284Srgrimes
270358Srgrimescpio-floppy:
271568Srgrimes	disklabel -w -r ${FLOPPY} ${FLOPPY_TYPE} \
272568Srgrimes		/usr/mdec/fdboot /usr/mdec/bootfd
273568Srgrimes	newfs -b 4096 -c 80 -f 512 -i 65536 -m 0 -o space \
2741027Sache			r${FLOPPY}  ${FLOPPY_TYPE}
2751027Sache	mount /dev/${FLOPPY} ${MOUNT}
276333Srgrimes	chown root.wheel ${MOUNT}/.
277333Srgrimes	chmod 755 ${MOUNT}/.
278284Srgrimes	(cd ${DESTDIR}/; \
279358Srgrimes		ls ${CPIO_FILES} | cpio -pdamuv ${MOUNT})
280284Srgrimes	(cd ${DESTDIR}/; \
281444Srgrimes	    (find ${CPIO_CPIO}; ls -d ${CPIO_CPIO_DIRS}) | \
282444Srgrimes		cpio -oav | gzip -9 >${MOUNT}/inst2.cpio.gz)
283284Srgrimes	install -c -o root -g wheel -m 755 etc.i386/inst2.profile \
284284Srgrimes	    ${MOUNT}/.profile
285284Srgrimes	install -c -o root -g wheel -m 755 etc.i386/inst2.install \
286284Srgrimes	    ${MOUNT}/install
287284Srgrimes	df -ik ${MOUNT}
2881027Sache	umount /dev/${FLOPPY}
2891027Sache	fsck /dev/r${FLOPPY}
2901027Sache	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/cpio-floppy \
291358Srgrimes		bs=15b count=160
292372Srgrimes	gzip --no-name -9 -c ${RELEASEDIR}/floppies/cpio-floppy \
293372Srgrimes		>${RELEASEDIR}/floppies/cpio-floppy.gz
294284Srgrimes
295372Srgrimesbin-tarball:
296372Srgrimes	(cd ${DESTDIR}; \
297538Srgrimes		tar cf - . | \
298538Srgrimes		gzip --no-name -9 -c | \
299538Srgrimes		split -b 240640 - \
300538Srgrimes		${RELEASEDIR}/tarballs/bin_tgz.)
301372Srgrimes
302538Srgrimessrcbase-tarball:
303376Srgrimes	(cd ${DESTDIR}; \
304538Srgrimes		tar -cf - usr/src/[A-Z]* | \
305538Srgrimes		gzip --no-name -9 -c | \
306538Srgrimes		split -b 240640 - \
307538Srgrimes		${RELEASEDIR}/tarballs/srcbase_tgz.)
308376Srgrimes
309538Srgrimessrcbin-tarball:
310376Srgrimes	(cd ${DESTDIR}; \
311538Srgrimes		tar -cf - usr/src/bin | \
312538Srgrimes		gzip --no-name -9 -c | \
313538Srgrimes		split -b 240640 - \
314538Srgrimes		${RELEASEDIR}/tarballs/srcbin_tgz.)
315376Srgrimes
316538Srgrimessrccontrib-tarball:
317538Srgrimes	(cd ${DESTDIR}; \
318538Srgrimes		tar -cf - usr/src/contrib | \
319538Srgrimes		gzip --no-name -9 -c | \
320538Srgrimes		split -b 240640 - \
321538Srgrimes		${RELEASEDIR}/tarballs/srccontrib_tgz.)
322538Srgrimes
323538Srgrimessrcetc-tarball:
324538Srgrimes	(cd ${DESTDIR}; \
325538Srgrimes		tar -cf - usr/src/etc | \
326538Srgrimes		gzip --no-name -9 -c | \
327538Srgrimes		split -b 240640 - \
328538Srgrimes		${RELEASEDIR}/tarballs/srcetc_tgz.)
329538Srgrimes
330538Srgrimessrcgames-tarball:
331538Srgrimes	(cd ${DESTDIR}; \
332538Srgrimes		tar -cf - usr/src/games | \
333538Srgrimes		gzip --no-name -9 -c | \
334538Srgrimes		split -b 240640 - \
335538Srgrimes		${RELEASEDIR}/tarballs/srcgames_tgz.)
336538Srgrimes
337538Srgrimessrcgnu-tarball:
338538Srgrimes	(cd ${DESTDIR}; \
339538Srgrimes		tar -cf - usr/src/gnu | \
340538Srgrimes		gzip --no-name -9 -c | \
341538Srgrimes		split -b 240640 - \
342538Srgrimes		${RELEASEDIR}/tarballs/srcgnu_tgz.)
343538Srgrimes
344538Srgrimessrcinclude-tarball:
345538Srgrimes	(cd ${DESTDIR}; \
346538Srgrimes		tar -cf - usr/src/include | \
347538Srgrimes		gzip --no-name -9 -c | \
348538Srgrimes		split -b 240640 - \
349538Srgrimes		${RELEASEDIR}/tarballs/srcinclude_tgz.)
350538Srgrimes
351538Srgrimessrclib-tarball:
352538Srgrimes	(cd ${DESTDIR}; \
353538Srgrimes		tar --exclude usr/src/${CRYPT_LIB} -cf - usr/src/lib | \
354538Srgrimes		gzip --no-name -9 -c | \
355538Srgrimes		split -b 240640 - \
356538Srgrimes		${RELEASEDIR}/tarballs/srclib_tgz.)
357538Srgrimes
358538Srgrimessrclibcrypt-tarball:
359538Srgrimes	(cd ${DESTDIR}; \
360538Srgrimes		tar -cf - usr/src/${CRYPT_LIB} | \
361538Srgrimes		gzip --no-name -9 -c | \
362538Srgrimes		split -b 240640 - \
363538Srgrimes		${RELEASEDIR}/tarballs/srclibcrypt_tgz.)
364538Srgrimes
365538Srgrimessrclibexec-tarball:
366538Srgrimes	(cd ${DESTDIR}; \
367538Srgrimes		tar -cf - usr/src/libexec | \
368538Srgrimes		gzip --no-name -9 -c | \
369538Srgrimes		split -b 240640 - \
370538Srgrimes		${RELEASEDIR}/tarballs/srclibexec_tgz.)
371538Srgrimes
372538Srgrimessrcsbin-tarball:
373538Srgrimes	(cd ${DESTDIR}; \
374538Srgrimes		tar -cf - usr/src/sbin | \
375538Srgrimes		gzip --no-name -9 -c | \
376538Srgrimes		split -b 240640 - \
377538Srgrimes		${RELEASEDIR}/tarballs/srcsbin_tgz.)
378538Srgrimes
379538Srgrimessrcshare-tarball:
380538Srgrimes	(cd ${DESTDIR}; \
381538Srgrimes		tar -cf - usr/src/share | \
382538Srgrimes		gzip --no-name -9 -c | \
383538Srgrimes		split -b 240640 - \
384538Srgrimes		${RELEASEDIR}/tarballs/srcshare_tgz.)
385538Srgrimes
386538Srgrimessrcsys-tarball:
387538Srgrimes	(cd ${DESTDIR}; \
388538Srgrimes		tar -cf - usr/src/sys | \
389538Srgrimes		gzip --no-name -9 -c | \
390538Srgrimes		split -b 240640 - \
391538Srgrimes		${RELEASEDIR}/tarballs/srcsys_tgz.)
392538Srgrimes
393538Srgrimessrcusrbin-tarball:
394538Srgrimes	(cd ${DESTDIR}; \
395538Srgrimes		tar -cf - usr/src/usr.bin | \
396538Srgrimes		gzip --no-name -9 -c | \
397538Srgrimes		split -b 240640 - \
398538Srgrimes		${RELEASEDIR}/tarballs/srcusrbin_tgz.)
399538Srgrimes
400538Srgrimessrcusrsbin-tarball:
401538Srgrimes	(cd ${DESTDIR}; \
402538Srgrimes		tar -cf - usr/src/usr.sbin | \
403538Srgrimes		gzip --no-name -9 -c | \
404538Srgrimes		split -b 240640 - \
405538Srgrimes		${RELEASEDIR}/tarballs/srcusrsbin_tgz.)
406538Srgrimes
407538Srgrimessrc-tarball: srcbase-tarball srcbin-tarball srccontrib-tarball srcetc-tarball \
408538Srgrimes	srcgames-tarball srcgnu-tarball srcinclude-tarball srclib-tarball \
409538Srgrimes	srclibcrypt-tarball srclibexec-tarball srcsbin-tarball \
410538Srgrimes	srcshare-tarball srcsys-tarball srcusrbin-tarball \
411538Srgrimes	srcusrsbin-tarball
412538Srgrimes
413372Srgrimesdes-tarball:
414372Srgrimes	rm -rf ${RELEASEDIR}/tmpdes
415372Srgrimes	mkdir ${RELEASEDIR}/tmpdes
416372Srgrimes	for i in ${CRYPT_DIRS}; do \
417372Srgrimes		cd ${RELEASEDIR}/tmpdes; \
418372Srgrimes		mkdir $$i; \
419372Srgrimes		chown ${BINOWN}.${GRPOWN} $$i; \
420372Srgrimes		chmod 755 $$i; \
421372Srgrimes	done
422372Srgrimes	# This is ugly, it force installs a /usr/lib/libcrypt.a so
423372Srgrimes	# that the other makes will be built with des.
424372Srgrimes	#
425372Srgrimes	(cd ${.CURDIR}/../${CRYPT_LIB}; \
426372Srgrimes		unset NOCRYPT; \
427372Srgrimes		DESTDIR=; export DESTDIR; \
428372Srgrimes		${MAKE} cleandir obj depend all install; \
429372Srgrimes		NOMAN=noman; export NOMAN; \
430372Srgrimes		DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
431372Srgrimes		${MAKE} cleandir obj depend all install)
432372Srgrimes	for i in ${CRYPT_SRCS}; do \
433372Srgrimes		unset NOCRYPT; \
434372Srgrimes		DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
435372Srgrimes		NOMAN=noman; export NOMAN; \
436372Srgrimes		cd ${.CURDIR}/../$$i; \
437372Srgrimes		${MAKE} cleandir obj depend all install; \
438372Srgrimes	done
439372Srgrimes	(cd ${RELEASEDIR}/tmpdes; \
440538Srgrimes		tar cf - . | \
441538Srgrimes			gzip --no-name -9 -c | \
442372Srgrimes			split -b 240640 - \
443436Srgrimes			${RELEASEDIR}/tarballs/des_tgz.)
444372Srgrimes	rm -rf ${RELEASEDIR}/tmpdes
445372Srgrimes
446147Srgrimesdistrib-dirs:
447238Sroot	mtree -u -f mtree/BSD.root.dist -p ${DESTDIR}/
448147Srgrimes	mtree -u -f mtree/BSD.var.dist -p ${DESTDIR}/var
449147Srgrimes	mtree -u -f mtree/BSD.usr.dist -p ${DESTDIR}/usr
450372Srgrimes.if defined(CDROMDIST)
451372Srgrimes	mtree -u -f mtree/BSD.local.dist -p ${DESTDIR}/usr/local
452372Srgrimes.endif
453410Srgrimes	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
454147Srgrimes
455372Srgrimesfloppies: kcopy-ah-floppy kcopy-bt-floppy filesystem-floppy \
456372Srgrimes	  cpio-floppy
457372Srgrimes
4581126Srgrimesrelease: release-dirs distribution kcopy-kernels \
459376Srgrimes	 bin-tarball des-tarball
460372Srgrimes	
461372Srgrimesrelease-dirs:
462994Srgrimes	rm -rf ${RELEASEDIR}/filesys
463994Srgrimes	mkdir ${RELEASEDIR}/filesys
464994Srgrimes	chown root.wheel ${RELEASEDIR}/filesys
465994Srgrimes	chmod 755 ${RELEASEDIR}/filesys
466372Srgrimes	rm -rf ${RELEASEDIR}/tarballs
467372Srgrimes	mkdir ${RELEASEDIR}/tarballs
468372Srgrimes	chown root.wheel ${RELEASEDIR}/tarballs
469372Srgrimes	chmod 755 ${RELEASEDIR}/tarballs
470372Srgrimes	rm -rf ${RELEASEDIR}/floppies
471372Srgrimes	mkdir ${RELEASEDIR}/floppies
472372Srgrimes	chown root.wheel ${RELEASEDIR}/floppies
473372Srgrimes	chmod 755 ${RELEASEDIR}/floppies
474372Srgrimes
47537Srgrimes.include <bsd.prog.mk>
476