Makefile revision 8494
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2#	$Id: Makefile,v 1.115 1995/05/11 05:22:29 jkh Exp $
3
4# disktab may be wrong -- hcx9 is a tahoe, but gets its own.
5# -rw-r--r--
6BINOWN= root
7BINGRP= wheel
8BIN1=   aliases csh.cshrc csh.login csh.logout dm.conf \
9	ftpusers gettytab group hosts host.conf hosts.equiv hosts.lpd \
10	inetd.conf login.access motd modems netstart \
11	networks phones printcap profile protocols \
12	rc rc.local rc.serial etc.${MACHINE}/rc.${MACHINE} \
13	remote security services sysconfig shells \
14	syslog.conf ttys etc.${MACHINE}/disktab rpc make.conf \
15	${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
16	${.CURDIR}/../usr.bin/mail/misc/mail.rc
17
18# -rw-rw-rw-
19BIN2=	motd
20
21# -rwxr-xr-x root.wheel, for the new cron root.wheel
22BIN3=	daily weekly monthly
23
24CLEANFILES+=	*.c *.o *.lo
25CLEANFILES+=	filesystem filesystem.cache filesystem.mk
26CLEANFILES+=	kcopy kcopy.cache kcopy.mk
27
28MAKEDEVS=	(cd ${MOUNT}/dev; \
29		    sh ${DESTDIR}/dev/MAKEDEV std; \
30		    rm -rf fd; \
31		    sh ${DESTDIR}/dev/MAKEDEV fd0 fd1; \
32		    rm -rf fd0?* rfd0?* fd1?* rfd1?*; \
33		    sh ${DESTDIR}/dev/MAKEDEV wd0 wd1 sd0 sd1 cd0 mcd0 mcd1; \
34		    rm -rf *wd[01][ijklm] rmcd*)
35
36NEWFS=		newfs -b 4096 -c 80 -f 512 -m 0 -o space -u 0 -t 0
37ZIPNSPLIT=	gzip --no-name -9 -c | split -b 240640 -
38
39MTREE=	BSD.local.dist BSD.root.dist BSD.usr.dist BSD.var.dist
40NAMEDB=	PROTO.localhost.rev named.boot named.root make-localhost
41PPPCNF= ppp.conf.filter.sample ppp.conf.iij ppp.conf.sample \
42	ppp.linkup.sample ppp.secret.sample
43PCS=	pcs750.bin
44WCS1=	wcs fppwcs poc poc1 poc2 fppoc
45WCS2=	fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual
46
47# Special top level files for FreeBSD
48COPYRIGHT=	COPYRIGHT
49FREEBSD=	
50FREEBSD+=	${COPYRIGHT}
51#
52# Floppy drive name, mount point, type and parameters for building Floppies
53FLOPPY?=	fd0
54MOUNT?=		/mnt
55FLOPPY_TYPE?=	fd1440
56FLOPPY_BS?=	18b
57FLOPPY_TRACKS?=	160
58#
59MDEC=		usr/mdec/bootfd usr/mdec/fdboot
60MDEC+=		usr/mdec/bootsd usr/mdec/sdboot
61MDEC+=		usr/mdec/bootwd usr/mdec/wdboot
62#
63KC_DIRS=	bin dev mnt sbin etc
64KC_FILES=	${COPYRIGHT}
65KC_LINKS=	bin/[ bin/cp bin/echo bin/sh bin/test
66KC_LINKS+=	sbin/fsck sbin/halt sbin/init
67KC_LINKS+=	sbin/mount sbin/mount_cd9660
68KC_LINKS+=	sbin/umount
69#
70CD_DIRS=	etc usr
71#
72FILESYSTEM_DIRS=	bin dev etc mnt proc sbin usr usr/bin usr/mdec usr/sbin
73FILESYSTEM_TREES=	dev
74FILESYSTEM_FILES=	${COPYRIGHT}
75FILESYSTEM_FILES+=	dev/MAKEDEV
76FILESYSTEM_FILES+=	etc/group
77FILESYSTEM_FILES+=	etc/master.passwd etc/passwd etc/pwd.db
78FILESYSTEM_FILES+=	${MDEC}
79FILESYSTEM_LINKS=	bin/[ bin/expr bin/ls bin/mkdir bin/rm
80FILESYSTEM_LINKS+=	bin/sh bin/sync bin/test
81FILESYSTEM_LINKS+=	sbin/disklabel sbin/fdisk sbin/halt sbin/init
82FILESYSTEM_LINKS+=	sbin/mount
83FILESYSTEM_LINKS+=	sbin/newfs
84FILESYSTEM_LINKS+=	sbin/umount
85FILESYSTEM_LINKS+=	usr/bin/cpio
86FILESYSTEM_LINKS+=	usr/bin/gunzip usr/bin/gzcat usr/bin/gzip usr/bin/zcat
87FILESYSTEM_LINKS+=	usr/sbin/bad144
88FILESYSTEM_CPIO=	.profile
89FILESYSTEM_CPIO+=	root/.profile
90FILESYSTEM_CPIO+=	bin/[
91FILESYSTEM_CPIO+=	bin/chmod bin/cat bin/cp bin/df bin/expr bin/ls
92FILESYSTEM_CPIO+=	bin/ln bin/mkdir bin/mv bin/rm bin/sync
93FILESYSTEM_CPIO+=	bin/test
94FILESYSTEM_CPIO+=	etc/spwd.db
95FILESYSTEM_CPIO+=	sbin/disklabel sbin/fdisk sbin/halt sbin/init
96FILESYSTEM_CPIO+=	sbin/mount
97FILESYSTEM_CPIO+=	sbin/newfs
98FILESYSTEM_CPIO+=	sbin/umount
99FILESYSTEM_CPIO_DIRS=	root
100
101CPIO_FILES=	${COPYRIGHT}
102CPIO_CPIO=	bin/dd bin/ps bin/pwd bin/stty
103CPIO_CPIO+=	etc/protocols etc/remote etc/services
104CPIO_CPIO+=	etc/termcap
105CPIO_CPIO+=	sbin/dmesg
106CPIO_CPIO+=	sbin/ifconfig sbin/fsck sbin/mknod sbin/mount_cd9660
107CPIO_CPIO+=	sbin/mount_procfs
108CPIO_CPIO+=	sbin/reboot sbin/route sbin/slattach
109CPIO_CPIO+=	usr/bin/awk usr/bin/chgrp usr/bin/cpio usr/bin/ex usr/bin/ftp
110CPIO_CPIO+=	usr/bin/gunzip usr/bin/gzcat usr/bin/gzip
111CPIO_CPIO+=	usr/bin/more usr/bin/tar usr/bin/tip
112CPIO_CPIO+=	usr/bin/vi usr/bin/view usr/bin/zcat
113CPIO_CPIO+=	usr/lib/libc.so.*
114CPIO_CPIO+=	usr/lib/libcurses.so.*
115CPIO_CPIO+=	usr/lib/libgcc.so.*
116CPIO_CPIO+=	usr/lib/libm.so.*
117CPIO_CPIO+=	usr/lib/libtermcap.so.*
118CPIO_CPIO+=	usr/lib/libutil.so.*
119CPIO_CPIO+=	usr/libexec/ld.so
120CPIO_CPIO+=	usr/sbin/bad144 usr/sbin/chown
121CPIO_CPIO+=	usr/share/misc/termcap
122CPIO_CPIO_DIRS=		tmp usr/lib usr/libexec usr/share usr/share/misc
123CPIO_CPIO_DIRS+=	var var/tmp var/run var/spool var/spool/lock
124
125SCRYPT_LIB=	lib/libcrypt
126DESCRYPT_LIB=	secure/lib/libcrypt
127CRYPT_SRCS=	bin/ed bin/rcp
128CRYPT_SRCS+=	sbin/init
129.if !defined(NOCRYPT)
130CRYPT_SRCS+=	secure
131.endif
132CRYPT_DIRS=	bin sbin usr usr/bin usr/lib
133
134LATIN1LINKS = \
135	da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES fi_FI \
136	fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE nl_NL no_NO \
137	pt_PT sv_SE
138
139all depend etc install lint:
140
141scrypt:
142	rm -f ${LIBCRYPT};
143	(cd ${.CURDIR}/../${SCRYPT_LIB}; \
144		${MAKE} cleandir obj depend all install)
145	for i in ${CRYPT_SRCS}; do \
146		cd ${.CURDIR}/../$$i; \
147		${MAKE} cleandir obj depend all; \
148	done
149
150descrypt:
151	rm -f ${LIBCRYPT};
152	(cd ${.CURDIR}/../${DESCRYPT_LIB}; \
153		${MAKE} cleandir obj depend all install)
154	for i in ${CRYPT_SRCS}; do \
155		cd ${.CURDIR}/../$$i; \
156		${MAKE} cleandir obj depend all; \
157	done
158
159distribute:
160	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/bin
161
162distribution:
163	(cd ${.CURDIR}; \
164	install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc; \
165	install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc; \
166	install -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN3} ${DESTDIR}/etc; \
167	install -c -o ${BINOWN} -g ${BINGRP} -m 644 crontab ${DESTDIR}/etc; \
168	install -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
169	    ${DESTDIR}/var/cron/log; \
170	install -c -o ${BINOWN} -g ${BINGRP} -m 600 \
171	    master.passwd ${DESTDIR}/etc; \
172	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; \
173	install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
174	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev )
175	(cd ${DESTDIR}/dev; sh MAKEDEV all) ;
176	(cd ${.CURDIR}/root; \
177		install -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.cshrc \
178		    ${DESTDIR}/root/.cshrc; \
179		install -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.klogin \
180		    ${DESTDIR}/root/.klogin; \
181		install -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.login \
182		    ${DESTDIR}/root/.login; \
183		install -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.profile \
184		    ${DESTDIR}/root/.profile; \
185		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
186		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
187		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
188	cd ${.CURDIR}/mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
189	    ${MTREE} ${DESTDIR}/etc/mtree
190	cd ${.CURDIR}/namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 \
191	    ${NAMEDB} ${DESTDIR}/etc/namedb
192	cd ${.CURDIR}/ppp; install -c -o ${BINOWN} -g ${BINGRP} -m 644 \
193	    ${PPPCNF} ${DESTDIR}/etc/ppp
194	install -c -o ${BINOWN} -g operator -m 664 /dev/null \
195	    ${DESTDIR}/etc/dumpdates
196	install -c -o nobody -g ${BINGRP} -m 664 /dev/null \
197	    ${DESTDIR}/var/db/locate.database
198	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
199	    ${DESTDIR}/var/log/lpd-errs
200	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
201	    ${DESTDIR}/var/log/maillog
202	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
203	    ${DESTDIR}/var/log/lastlog
204	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
205	    ${DESTDIR}/var/log/messages
206	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
207	    ${DESTDIR}/var/log/wtmp
208	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
209	    ${DESTDIR}/var/run/utmp
210	install -c -o ${BINOWN} -g ${BINGRP} -m 664 ${.CURDIR}/minfree \
211	    ${DESTDIR}/var/crash
212	(cd ${.CURDIR}/etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} \
213	    -m 444 fstab.* ${DESTDIR}/etc)
214	(cd ${.CURDIR}/../usr.sbin/sendmail/src; \
215	    ${MAKE} obj; \
216	    ${MAKE} all; \
217	    ${MAKE} install; \
218	 cd ../cf/cf; \
219	    ${MAKE} obj; \
220	    ${MAKE} freefall.cf; \
221	    install -o ${BINOWN} -g ${BINGRP} -m 644 obj/freefall.cf \
222	        ${DESTDIR}/etc/sendmail.cf)
223	(cd ${.CURDIR}/..; \
224	    install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} ${DESTDIR}/)
225	(cd ${.CURDIR}/../share/man; ${MAKE} makedb; )
226
227crunch:
228	crunchgen ${.CURDIR}/../usr.sbin/crunch/examples/kcopy.conf
229	${MAKE} -f kcopy.mk objs exe
230	crunchgen ${.CURDIR}/../usr.sbin/crunch/examples/filesystem.conf
231	${MAKE} -f filesystem.mk objs exe
232
233extract:
234	install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
235	    ${.CURDIR}/etc.i386/EXTRACT_bin.sh \
236	    ${RELEASEDIR}/tarballs/bin/EXTRACT.sh
237	install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
238	    ${.CURDIR}/etc.i386/EXTRACT_src.sh \
239	    ${RELEASEDIR}/tarballs/bin/EXTRACT.sh
240	install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
241	    ${.CURDIR}/etc.i386/EXTRACT_secr.sh \
242	    ${RELEASEDIR}/tarballs/bin/EXTRACT.sh
243
244hcx9-distribution:
245	(cd ${.CURDIR}/etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} \
246	    -m 444 ${WCS2} ${DESTDIR}/)
247
248kcopy-kernels: ${.CURDIR}/../sys/i386/conf/GENERIC
249	(cd ${.CURDIR}/../sys/compile; rm -rf GENERIC)
250	(cd ${.CURDIR}/../sys/i386/conf; config GENERIC)
251	(cd ${.CURDIR}/../sys/compile/GENERIC; ${MAKE} depend; ${MAKE} all; \
252	    install -c -o ${BINOWN} -g ${BINGRP} -m 755 kernel \
253	        ${DESTDIR}/kernel.GENERIC)
254
255kcopy-floppy:
256	echo y | fdformat ${FLOPPY}
257	disklabel -w -r -B -b ${DESTDIR}/usr/mdec/fdboot \
258		-s ${DESTDIR}/usr/mdec/bootfd ${FLOPPY} ${FLOPPY_TYPE}
259	${NEWFS} -i 8192 r${FLOPPY} ${FLOPPY_TYPE}
260	mount /dev/${FLOPPY} ${MOUNT}
261	chown ${BINOWN}.${BINGRP} ${MOUNT}/.
262	chmod 755 ${MOUNT}/.
263	(cd ${DESTDIR}/; \
264	    ls -d ${KC_DIRS} | cpio -pdamuv ${MOUNT})
265	${MAKEDEVS}
266	(cd ${DESTDIR}/; \
267	    ls ${KC_FILES} | cpio -pdamuv ${MOUNT})
268	install -c -o ${BINOWN} -g ${BINGRP} -m 755 \
269	    ${.CURDIR}/etc.i386/kc.profile ${MOUNT}/etc/rc
270	install -c -o ${BINOWN} -g ${BINGRP} -m 755 \
271	    kcopy ${MOUNT}/bin/kcopy
272	(cd ${MOUNT}/; \
273	    for i in ${KC_LINKS}; do \
274		ln bin/kcopy $$i; \
275	    done)
276
277kcopy.flp:
278	(cd ${.CURDIR}; ${MAKE} kcopy-floppy)
279	(cd ${.CURDIR}/../sys/compile/GENERIC; \
280	    install -c -o ${BINOWN} -g ${BINGRP} -m 755 kernel ${MOUNT}/)
281	df -ik ${MOUNT}
282	# XXX umount is returning 1 for some reason :-(
283	-umount /dev/${FLOPPY}
284	fsck /dev/r${FLOPPY}
285	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/kcopy.flp \
286		bs=${FLOPPY_BS} count=${FLOPPY_TRACKS}
287	gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy.flp \
288		>${RELEASEDIR}/floppies/kcopy.flp.gz &
289
290cdins-floppy:
291	(cd ${.CURDIR}; ${MAKE} kcopy-floppy)
292	(cd ${DESTDIR}/; \
293	    ls -d ${CD_DIRS} | cpio -pdamuv ${MOUNT})
294	(cd ${MOUNT}/usr; \
295	    ln -s /cdrom/filesys/usr/libexec libexec; \
296	    ln -s /cdrom/filesys/usr/lib lib)
297	mkdir ${MOUNT}/cdrom
298	chown ${BINOWN}.${BINGRP} ${MOUNT}/cdrom
299	chmod 755 ${MOUNT}/cdrom
300	#install -c -o ${BINOWN} -g ${BINGRP} -m 755 \
301	#    ${.CURDIR}/etc.i386/cdinst1.profile ${MOUNT}/.profile
302	install -c -o ${BINOWN} -g ${BINGRP} -m 755 \
303	    ${.CURDIR}/etc.i386/cdinst1.install ${MOUNT}/install
304	ln ${MOUNT}/install ${MOUNT}/etc/rc
305
306cdins.flp:
307	(cd ${.CURDIR}; ${MAKE} kcopy-floppy)
308	(cd ${.CURDIR}/../sys/compile/GENERIC; \
309	    install -c -o ${BINOWN} -g ${BINGRP} -m 755 kernel ${MOUNT}/)
310	df -ik ${MOUNT}
311	# XXX umount is returning 1 for some reason :-(
312	-umount /dev/${FLOPPY}
313	fsck /dev/r${FLOPPY}
314	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/cdins.flp \
315		bs=${FLOPPY_BS} count=${FLOPPY_TRACKS}
316	gzip --no-name -9 -c ${RELEASEDIR}/floppies/cdins.flp \
317		>${RELEASEDIR}/floppies/cdins.flp.gz &
318
319filesyst.flp:
320	echo y | fdformat ${FLOPPY}
321	disklabel -w -r -B -b ${DESTDIR}/usr/mdec/fdboot \
322		-s ${DESTDIR}/usr/mdec/bootfd ${FLOPPY} ${FLOPPY_TYPE}
323	${NEWFS} -i 10240 r${FLOPPY}  ${FLOPPY_TYPE}
324	mount /dev/${FLOPPY}  ${MOUNT}
325	chown ${BINOWN}.${BINGRP} ${MOUNT}/.
326	chmod 755 ${MOUNT}/.
327	(cd ${DESTDIR}/; \
328	    ls -d ${FILESYSTEM_DIRS} | cpio -pdamuv ${MOUNT})
329	${MAKEDEVS}
330	(cd ${DESTDIR}/; \
331	    ls ${FILESYSTEM_FILES} | cpio -pdamuv ${MOUNT}; \
332	    (find ${FILESYSTEM_CPIO}; ls -d ${FILESYSTEM_CPIO_DIRS}) | \
333		cpio -H newc --block-size=16 -oav | \
334		gzip -9 >${MOUNT}/inst1.cpio.gz)
335	#install -c -o ${BINOWN} -g ${BINGRP} -m 755 \
336	#    ${.CURDIR}/etc.i386/inst1.profile ${MOUNT}/.profile
337	install -c -o ${BINOWN} -g ${BINGRP} -m 755 \
338	    ${.CURDIR}/etc.i386/inst1.install ${MOUNT}/install
339	ln ${MOUNT}/install ${MOUNT}/etc/rc
340	install -c -o ${BINOWN} -g ${BINGRP} -m 755 \
341	    filesystem ${MOUNT}/bin/filesystem
342	(cd ${MOUNT}/; \
343	    for i in ${FILESYSTEM_LINKS}; do \
344		ln bin/filesystem $$i; \
345	    done)
346	(cd ${MOUNT}/; \
347	    ls ${FILESYSTEM_FILES} >/tmp/filelist; \
348	    ls ${FILESYSTEM_LINKS} >>/tmp/filelist; \
349	    ls -d ${FILESYSTEM_DIRS} >>/tmp/filelist; \
350	    find ${FILESYSTEM_TREES} >>/tmp/filelist; \
351	    sort -u -r /tmp/filelist >filelist; \
352	    rm /tmp/filelist)
353	df -ik ${MOUNT}
354	# XXX umount is returning 1 for some reason :-(
355	-umount /dev/${FLOPPY}
356	fsck /dev/r${FLOPPY}
357	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/filesyst.flp \
358		bs=${FLOPPY_BS} count=${FLOPPY_TRACKS}
359	gzip --no-name -9 -c ${RELEASEDIR}/floppies/filesyst.flp \
360		>${RELEASEDIR}/floppies/filesyst.flp.gz &
361
362cpio.flp:
363	echo y | fdformat ${FLOPPY}
364	disklabel -w -r -B -b ${DESTDIR}/usr/mdec/fdboot \
365		-s ${DESTDIR}/usr/mdec/bootfd ${FLOPPY} ${FLOPPY_TYPE}
366	${NEWFS} -i 65536 r${FLOPPY}  ${FLOPPY_TYPE}
367	mount /dev/${FLOPPY} ${MOUNT}
368	chown ${BINOWN}.${BINGRP} ${MOUNT}/.
369	chmod 755 ${MOUNT}/.
370	(cd ${DESTDIR}/; \
371		ls ${CPIO_FILES} | cpio -pdamuv ${MOUNT})
372	#
373	# XXX This ugliness is because the default termcap file is simply too
374	# big and we don't need such a hugh one for the initial installation,
375	# yet we want the symlink in /etc to point to the right place so we
376	# need to install the smaller one in the same location.
377	#
378	mv ${DESTDIR}/usr/share/misc/termcap ${DESTDIR}/usr/share/misc/otermcap
379	install -c -o ${BINOWN} -g ${BINGRP} -m 755 \
380	    ${.CURDIR}/termcap.small ${DESTDIR}/usr/share/misc/termcap
381	(cd ${DESTDIR}/; \
382	    (find ${CPIO_CPIO}; ls -d ${CPIO_CPIO_DIRS}) | \
383		cpio -H newc --block-size=16 -oav | \
384		gzip -9 >${MOUNT}/inst2.cpio.gz)
385	# XXX cpio is done, put everything back in shape for the bindist.
386	mv ${DESTDIR}/usr/share/misc/otermcap ${DESTDIR}/usr/share/misc/termcap
387	install -c -o ${BINOWN} -g ${BINGRP} -m 755 \
388	    ${.CURDIR}/etc.i386/cpio.rc ${MOUNT}/rc
389	install -c -o ${BINOWN} -g ${BINGRP} -m 755 \
390	    ${.CURDIR}/etc.i386/cpio.install ${MOUNT}/install
391	install -c -o ${BINOWN} -g ${BINGRP} -m 755 \
392	    ${.CURDIR}/etc.i386/cpio.magic ${MOUNT}/magic
393	df -ik ${MOUNT}
394	# XXX umount is returning 1 for some reason :-(
395	-umount /dev/${FLOPPY}
396	fsck /dev/r${FLOPPY}
397	dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/cpio.flp \
398		bs=${FLOPPY_BS} count=${FLOPPY_TRACKS}
399	gzip --no-name -9 -c ${RELEASEDIR}/floppies/cpio.flp \
400		>${RELEASEDIR}/floppies/cpio.flp.gz &
401
402bin-tarball:
403	(cd ${DESTDIR}; \
404		mkdir -p ${RELEASEDIR}/tarballs/bin; \
405		tar cf - . | \
406		${ZIPNSPLIT} ${RELEASEDIR}/tarballs/bin/bin.)
407
408des-tarball:
409	rm -rf ${RELEASEDIR}/tmpdes
410	mkdir ${RELEASEDIR}/tmpdes
411	for i in ${CRYPT_DIRS}; do \
412		cd ${RELEASEDIR}/tmpdes; \
413		mkdir $$i; \
414		chown ${BINOWN}.${GRPOWN} $$i; \
415		chmod 755 $$i; \
416	done
417	# This is ugly, it force installs a /usr/lib/libcrypt.a so
418	# that the other makes will be built with des.
419	#
420	(set -x ; cd ${.CURDIR}/../${DESCRYPT_LIB}; \
421		NOCRYPT=; \
422		unset NOCRYPT; \
423		DESTDIR=; export DESTDIR; \
424		${MAKE} cleandir obj depend all install; \
425		NOMAN=noman; export NOMAN; \
426		DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
427		${MAKE} cleandir obj depend all install)
428	for i in ${CRYPT_SRCS}; do \
429		NOCRYPT=; \
430		unset NOCRYPT; \
431		DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
432		NOMAN=noman; export NOMAN; \
433		cd ${.CURDIR}/../$$i; \
434		${MAKE} cleandir obj depend all install; \
435	done
436	(cd ${RELEASEDIR}/tmpdes; \
437		tar cf - . | \
438			${ZIPNSPLIT} ${RELEASEDIR}/tarballs/des/des_tgz.)
439	rm -rf ${RELEASEDIR}/tmpdes
440
441distrib-dirs:
442	mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
443	mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
444	mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
445	mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
446		-p ${DESTDIR}/usr/include
447.if defined(MAKE_LOCAL)
448	mtree -deU -f ${.CURDIR}/mtree/BSD.local.dist -p ${DESTDIR}/usr/local
449.endif
450	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
451	cd ${DESTDIR}/usr/share/locale; \
452	for l in ${LATIN1LINKS} ; do \
453		rm -f $$l.ISO8859-1; \
454		ln -s lt_LN.ISO8859-1 $$l.ISO8859-1; \
455	done
456
457floppies:	kcopy.flp filesyst.flp cpio.flp cdins.flp
458
459release:	release-dirs distribution crunch extract kcopy-kernels \
460		floppies bin-tarball des-tarball clean
461
462release-dirs:
463	chflags -R noschg ${RELEASEDIR}/
464	rm -rf ${RELEASEDIR}/*
465	mtree -d -U -f ${.CURDIR}/mtree/BSD.release.dist -p ${RELEASEDIR}
466
467.include <bsd.prog.mk>
468