1# from: @(#)Makefile 5.11 (Berkeley) 5/21/91 2# $Id: Makefile,v 1.75 1994/06/29 11:06:30 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 myname netstart \ 11 networks phones printcap protocols rc rc.local remote \ 12 security services shells skey.access \ 13 syslog.conf ttys etc.${MACHINE}/disktab rpc make.conf \ 14 ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \ 15 ${.CURDIR}/../usr.bin/mail/misc/mail.rc 16 17# -rw-rw-rw- 18BIN2= motd 19 20# -rwxr-xr-x root.wheel, for the new cron root.wheel 21BIN3= daily weekly monthly 22 23CLEANFILES+= *.o *.lo *.c *.cache *.mk kcopy filesystem 24 25ZIPNSPLIT= gzip --no-name -9 -c | split -b 240640 - 26 27MTREE= BSD.local.dist BSD.root.dist BSD.usr.dist BSD.var.dist 28NAMEDB= localhost.rev named.boot root.cache 29PCS= pcs750.bin 30WCS1= wcs fppwcs poc poc1 poc2 fppoc 31WCS2= fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual 32 33# Special top level files for FreeBSD 34COPYRIGHT= COPYRIGHT.386BSD COPYRIGHT.FreeBSD 35FREEBSD= CONTRIB.386BSD CONTRIB.FreeBSD ROSTER.FreeBSD 36FREEBSD+= MIRROR.SITES PERSONAL.ACKS RELNOTES.FreeBSD SUPPORT.TXT 37FREEBSD+= ${COPYRIGHT} 38# 39# Floppy drive name and files for building FreeBSD Floppies 40FLOPPY?= fd0 41MOUNT?= /mnt 42FLOPPY_TYPE?= fd1200 43# 44MDEC= usr/mdec/bootfd usr/mdec/fdboot 45MDEC+= usr/mdec/bootsd usr/mdec/sdboot 46MDEC+= usr/mdec/bootwd usr/mdec/wdboot 47# 48KC_DIRS= bin dev mnt sbin 49KC_FILES= ${COPYRIGHT} 50KC_LINKS= bin/[ bin/cp bin/echo bin/sh bin/test 51KC_LINKS+= sbin/fsck sbin/halt sbin/init 52KC_LINKS+= sbin/mount sbin/mount_isofs 53KC_LINKS+= sbin/umount 54# 55CD_DIRS= etc usr 56# 57FILESYSTEM_DIRS= bin dev etc mnt proc sbin usr usr/bin usr/mdec usr/sbin 58FILESYSTEM_TREES= dev 59FILESYSTEM_FILES= ${COPYRIGHT} 60FILESYSTEM_FILES+= dev/MAKEDEV 61FILESYSTEM_FILES+= etc/group 62FILESYSTEM_FILES+= etc/master.passwd etc/passwd etc/pwd.db 63FILESYSTEM_FILES+= ${MDEC} 64FILESYSTEM_LINKS= bin/[ bin/expr bin/ls bin/mkdir bin/rm 65FILESYSTEM_LINKS+= bin/sh bin/sync bin/test 66FILESYSTEM_LINKS+= sbin/disklabel sbin/fdisk sbin/halt sbin/init 67FILESYSTEM_LINKS+= sbin/mount sbin/mount_pcfs 68FILESYSTEM_LINKS+= sbin/newfs 69FILESYSTEM_LINKS+= sbin/umount 70FILESYSTEM_LINKS+= usr/bin/cpio 71FILESYSTEM_LINKS+= usr/bin/gunzip usr/bin/gzcat usr/bin/gzip usr/bin/zcat 72FILESYSTEM_LINKS+= usr/sbin/bad144 73FILESYSTEM_CPIO= .profile 74FILESYSTEM_CPIO+= root/.profile 75FILESYSTEM_CPIO+= bin/[ 76FILESYSTEM_CPIO+= bin/chmod bin/cat bin/cp bin/df bin/expr bin/ls 77FILESYSTEM_CPIO+= bin/ln bin/mkdir bin/mv bin/rm bin/sync 78FILESYSTEM_CPIO+= bin/test 79FILESYSTEM_CPIO+= etc/spwd.db 80FILESYSTEM_CPIO+= sbin/disklabel sbin/fdisk sbin/halt sbin/init 81FILESYSTEM_CPIO+= sbin/mount sbin/mount_pcfs 82FILESYSTEM_CPIO+= sbin/newfs 83FILESYSTEM_CPIO+= sbin/umount 84FILESYSTEM_CPIO_DIRS= root 85 86CPIO_FILES= ${COPYRIGHT} 87CPIO_CPIO= bin/dd bin/ps bin/pwd bin/stty 88CPIO_CPIO+= etc/protocols etc/remote etc/services 89CPIO_CPIO+= etc/termcap 90CPIO_CPIO+= sbin/dmesg 91CPIO_CPIO+= sbin/ifconfig sbin/fsck sbin/mknod sbin/mount_isofs 92CPIO_CPIO+= sbin/mount_procfs 93CPIO_CPIO+= sbin/reboot sbin/route sbin/slattach 94CPIO_CPIO+= usr/bin/awk usr/bin/chgrp usr/bin/cpio usr/bin/ex usr/bin/ftp 95CPIO_CPIO+= usr/bin/gunzip usr/bin/gzcat usr/bin/gzip 96CPIO_CPIO+= usr/bin/more usr/bin/tar usr/bin/tip 97CPIO_CPIO+= usr/bin/vi usr/bin/view usr/bin/zcat 98CPIO_CPIO+= usr/lib/libc.so.1.1 99CPIO_CPIO+= usr/lib/libcurses.so.1.1 100CPIO_CPIO+= usr/lib/libgcc.so.1.1 101CPIO_CPIO+= usr/lib/libm.so.1.1 102CPIO_CPIO+= usr/lib/libtermlib.so.1.1 103CPIO_CPIO+= usr/lib/libtermcap.so.1.1 104CPIO_CPIO+= usr/lib/libutil.so.1.1 105CPIO_CPIO+= usr/libexec/ld.so 106CPIO_CPIO+= usr/sbin/bad144 usr/sbin/chown 107CPIO_CPIO+= usr/share/misc/termcap 108CPIO_CPIO_DIRS= tmp usr/lib usr/libexec usr/share usr/share/misc 109CPIO_CPIO_DIRS+= var var/tmp var/run var/spool var/spool/lock 110 111CRYPT_LIB= lib/libcrypt 112CRYPT_SRCS= bin/ed bin/rcp 113CRYPT_SRCS+= libexec/ftpd libexec/makekey libexec/rexecd libexec/rlogind 114CRYPT_SRCS+= libexec/rshd libexec/telnetd libexec/uucpd 115CRYPT_SRCS+= sbin/init.bsdi 116CRYPT_SRCS+= usr.bin/bdes usr.bin/lock usr.bin/login usr.bin/passwd 117CRYPT_SRCS+= usr.bin/rlogin usr.bin/rsh usr.bin/su usr.bin/telnet 118CRYPT_DIRS= bin sbin usr usr/bin usr/lib usr/libexec 119 120all depend etc install lint: 121 122crypt: 123 rm -f ${LIBCRYPT}; 124 (cd ${.CURDIR}/../${CRYPT_LIB}; \ 125 ${MAKE} cleandir obj depend all install) 126 for i in ${CRYPT_SRCS}; do \ 127 cd ${.CURDIR}/../$$i; \ 128 ${MAKE} cleandir obj depend all; \ 129 done 130 131non-crypt: 132 rm -f ${LIBCRYPT} 133 for i in ${CRYPT_SRCS}; do \ 134 cd ${.CURDIR}/../$$i; \ 135 ${MAKE} cleandir obj depend all; \ 136 done 137 138distribution: distrib-dirs 139 (cd ${.CURDIR}; \ 140 install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc; \ 141 install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc; \ 142 install -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN3} ${DESTDIR}/etc; \ 143 install -c -o ${BINOWN} -g ${BINGRP} -m 644 crontab ${DESTDIR}/etc; \ 144 install -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 145 ${DESTDIR}/var/cron/log; \ 146 install -c -o ${BINOWN} -g ${BINGRP} -m 600 \ 147 master.passwd ${DESTDIR}/etc; \ 148 pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; \ 149 install -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 150 MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev ) 151.if defined(CDROMDIST) 152 (cd ${DESTDIR}/dev; sh MAKEDEV all) ; 153.endif 154 (cd ${.CURDIR}/root; \ 155 install -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.cshrc \ 156 ${DESTDIR}/root/.cshrc; \ 157 install -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.klogin \ 158 ${DESTDIR}/root/.klogin; \ 159 install -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.login \ 160 ${DESTDIR}/root/.login; \ 161 install -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.profile \ 162 ${DESTDIR}/root/.profile; \ 163 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 164 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 165 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile) 166 cd ${.CURDIR}/mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \ 167 ${MTREE} ${DESTDIR}/etc/mtree 168 cd ${.CURDIR}/namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 \ 169 ${NAMEDB} ${DESTDIR}/etc/namedb 170 install -c -o ${BINOWN} -g operator -m 664 /dev/null \ 171 ${DESTDIR}/etc/dumpdates 172 install -c -o nobody -g ${BINGRP} -m 664 /dev/null \ 173 ${DESTDIR}/var/db/locate.database 174 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 175 ${DESTDIR}/var/log/lpd-errs 176 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 177 ${DESTDIR}/var/log/maillog 178 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 179 ${DESTDIR}/var/log/lastlog 180 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 181 ${DESTDIR}/var/log/messages 182 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 183 ${DESTDIR}/var/log/wtmp 184 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 185 ${DESTDIR}/var/run/utmp 186 install -c -o ${BINOWN} -g ${BINGRP} -m 664 ${.CURDIR}/minfree \ 187 ${DESTDIR}/var/crash 188 (cd ${.CURDIR}/etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} \ 189 -m 444 fstab.* ${DESTDIR}/etc) 190.if defined(NOCRYPT) 191 (cd ${.CURDIR}; ${MAKE} non-crypt) 192 (cd ${.CURDIR}/..; NOCRYPT=nocrypt; export NOCRYPT; ${MAKE} install) 193.else 194 (cd ${.CURDIR}; ${MAKE} crypt) 195 (cd ${.CURDIR}/..; ${MAKE} install) 196.endif 197 (cd ${.CURDIR}/../usr.sbin/sendmail/src; \ 198 ${MAKE} install; \ 199 cd ../cf/cf; \ 200 ${MAKE} obj; \ 201 ${MAKE} freefall.cf; \ 202 install -o ${BINOWN} -g ${BINGRP} -m 644 obj/freefall.cf \ 203 ${DESTDIR}/etc/sendmail.cf) 204 (cd ${.CURDIR}/..; \ 205 install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} ${DESTDIR}/) 206 (cd ${.CURDIR}/..; ${MAKE} mdec; ) 207 (cd ${.CURDIR}/../share/man; ${MAKE} makedb; ) 208.if ${MACHINE} == "tahoe" 209 (cd ${.CURDIR}/etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} \ 210 -m 444 ${WCS1} ${DESTDIR}/) 211.endif 212.if ${MACHINE} == "vax" 213 (cd ${.CURDIR}/etc.vax; install -c -o ${BINOWN} -g ${BINGRP} \ 214 -m 444 ${PCS} ${DESTDIR}/) 215.endif 216 217crunch: 218 crunchgen ${.CURDIR}/../contrib/crunch/examples/kcopy.conf 219 ${MAKE} -f kcopy.mk objs exe 220 crunchgen ${.CURDIR}/../contrib/crunch/examples/filesystem.conf 221 ${MAKE} -f filesystem.mk objs exe 222 223extract: 224 install -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 225 ${.CURDIR}/etc.i386/EXTRACT_bin.sh ${RELEASEDIR}/tarballs/bindist 226 install -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 227 ${.CURDIR}/etc.i386/EXTRACT_src.sh ${RELEASEDIR}/tarballs/srcdist 228 install -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 229 ${.CURDIR}/etc.i386/EXTRACT_secr.sh ${RELEASEDIR}/tarballs/secrdist 230 231hcx9-distribution: 232 (cd ${.CURDIR}/etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} \ 233 -m 444 ${WCS2} ${DESTDIR}/) 234 235kcopy-kernels: ${.CURDIR}/../sys/i386/conf/GENERICAH ${.CURDIR}/../sys/i386/conf/GENERICBT 236 (cd ${.CURDIR}/../sys/compile; rm -rf GENERICAH GENERICBT) 237 (cd ${.CURDIR}/../sys/i386/conf; config GENERICAH; config GENERICBT) 238 (cd ${.CURDIR}/../sys/compile/GENERICAH; ${MAKE} depend; ${MAKE} all; \ 239 install -c -o ${BINOWN} -g ${BINGRP} -m 755 386bsd \ 240 ${DESTDIR}/386bsd.GENERICAH) 241 (cd ${.CURDIR}/../sys/compile/GENERICBT; ${MAKE} depend; ${MAKE} all; \ 242 install -c -o ${BINOWN} -g ${BINGRP} -m 755 386bsd \ 243 ${DESTDIR}/386bsd.GENERICBT) 244 245kcopy-floppy: 246 disklabel -w -r ${FLOPPY} ${FLOPPY_TYPE} \ 247 ${DESTDIR}/usr/mdec/fdboot ${DESTDIR}/usr/mdec/bootfd 248 newfs -b 4096 -c 80 -f 512 -i 8192 -m 0 -o space \ 249 r${FLOPPY} ${FLOPPY_TYPE} 250 mount /dev/${FLOPPY} ${MOUNT} 251 chown ${BINOWN}.${BINGRP} ${MOUNT}/. 252 chmod 755 ${MOUNT}/. 253 (cd ${DESTDIR}/; \ 254 ls -d ${KC_DIRS} | cpio -pdamuv ${MOUNT}) 255 (cd ${MOUNT}/dev; \ 256 sh ${DESTDIR}/dev/MAKEDEV std; \ 257 rm -rf fd; \ 258 sh ${DESTDIR}/dev/MAKEDEV fd0 fd1 wd0 wd1 sd0 sd1; \ 259 rm -rf fd0?* rfd0?* fd1?* rfd1?*; \ 260 sh ${DESTDIR}/dev/MAKEDEV cd0 mcd0 mcd1; \ 261 rm -rf rmcd*) 262 (cd ${DESTDIR}/; \ 263 ls ${KC_FILES} | cpio -pdamuv ${MOUNT}) 264 install -c -o ${BINOWN} -g ${BINGRP} -m 755 \ 265 ${.CURDIR}/etc.i386/kc.profile ${MOUNT}/.profile 266 install -c -o ${BINOWN} -g ${BINGRP} -m 755 \ 267 kcopy ${MOUNT}/bin/kcopy 268 (cd ${MOUNT}/; \ 269 for i in ${KC_LINKS}; do \ 270 ln bin/kcopy $$i; \ 271 done) 272 273kcopy_ah.flp: 274 ${MAKE} kcopy-floppy 275 (cd ${.CURDIR}/../sys/compile/GENERICAH; \ 276 install -c -o ${BINOWN} -g ${BINGRP} -m 755 386bsd ${MOUNT}/) 277 df -ik ${MOUNT} 278 umount /dev/${FLOPPY} 279 fsck /dev/r${FLOPPY} 280 dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/kcopy_ah.flp \ 281 bs=15b count=160 282 gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy_ah.flp \ 283 >${RELEASEDIR}/floppies/kcopy_ah.flp.gz & 284 285kcopy_bt.flp: 286 ${MAKE} kcopy-floppy 287 (cd ${.CURDIR}/../sys/compile/GENERICBT; \ 288 install -c -o ${BINOWN} -g ${BINGRP} -m 755 386bsd ${MOUNT}/) 289 df -ik ${MOUNT} 290 umount /dev/${FLOPPY} 291 fsck /dev/r${FLOPPY} 292 dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/kcopy_bt.flp \ 293 bs=15b count=160 294 gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy_bt.flp \ 295 >${RELEASEDIR}/floppies/kcopy_bt.flp.gz & 296 297cdins-floppy: 298 ${MAKE} kcopy-floppy 299 (cd ${DESTDIR}/; \ 300 ls -d ${CD_DIRS} | cpio -pdamuv ${MOUNT}) 301 (cd ${MOUNT}/usr; \ 302 ln -s /cdrom/filesys/usr/libexec libexec; \ 303 ln -s /cdrom/filesys/usr/lib lib) 304 mkdir ${MOUNT}/cdrom 305 chown ${BINOWN}.${BINGRP} ${MOUNT}/cdrom 306 chmod 755 ${MOUNT}/cdrom 307 install -c -o ${BINOWN} -g ${BINGRP} -m 755 \ 308 ${.CURDIR}/etc.i386/cdinst1.profile ${MOUNT}/.profile 309 install -c -o ${BINOWN} -g ${BINGRP} -m 755 \ 310 ${.CURDIR}/etc.i386/cdinst1.install ${MOUNT}/install 311 312cdins_ah.flp: 313 ${MAKE} cdins-floppy 314 (cd ${.CURDIR}/../sys/compile/GENERICAH; \ 315 install -c -o ${BINOWN} -g ${BINGRP} -m 755 386bsd ${MOUNT}/) 316 df -ik ${MOUNT} 317 umount /dev/${FLOPPY} 318 fsck /dev/r${FLOPPY} 319 dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/cdins_ah.flp \ 320 bs=15b count=160 321 gzip --no-name -9 -c ${RELEASEDIR}/floppies/cdins_ah.flp \ 322 >${RELEASEDIR}/floppies/cdins_ah.flp.gz & 323 324cdins_bt.flp: 325 ${MAKE} cdins-floppy 326 (cd ${.CURDIR}/../sys/compile/GENERICBT; \ 327 install -c -o ${BINOWN} -g ${BINGRP} -m 755 386bsd ${MOUNT}/) 328 df -ik ${MOUNT} 329 umount /dev/${FLOPPY} 330 fsck /dev/r${FLOPPY} 331 dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/cdins_bt.flp \ 332 bs=15b count=160 333 gzip --no-name -9 -c ${RELEASEDIR}/floppies/cdins_bt.flp \ 334 >${RELEASEDIR}/floppies/cdins_bt.flp.gz & 335 336filesyst.flp: 337 disklabel -w -r ${FLOPPY} ${FLOPPY_TYPE} \ 338 ${DESTDIR}/usr/mdec/fdboot ${DESTDIR}/usr/mdec/bootfd 339 newfs -b 4096 -c 80 -f 512 -i 10240 -m 0 -o space \ 340 r${FLOPPY} ${FLOPPY_TYPE} 341 mount /dev/${FLOPPY} ${MOUNT} 342 chown ${BINOWN}.${BINGRP} ${MOUNT}/. 343 chmod 755 ${MOUNT}/. 344 (cd ${DESTDIR}/; \ 345 ls -d ${FILESYSTEM_DIRS} | cpio -pdamuv ${MOUNT}) 346 (cd ${MOUNT}/dev; \ 347 sh ${DESTDIR}/dev/MAKEDEV std; \ 348 rm -rf fd; \ 349 sh ${DESTDIR}/dev/MAKEDEV fd0 fd1 wd0 sd0 sd1; \ 350 rm -f fd0?* fd1?* rfd0?* rfd1?*) 351 (cd ${DESTDIR}/; \ 352 ls ${FILESYSTEM_FILES} | cpio -pdamuv ${MOUNT}; \ 353 (find ${FILESYSTEM_CPIO}; ls -d ${FILESYSTEM_CPIO_DIRS}) | \ 354 cpio -H newc --block-size=16 -oav | \ 355 gzip -9 >${MOUNT}/inst1.cpio.gz) 356 install -c -o ${BINOWN} -g ${BINGRP} -m 755 \ 357 ${.CURDIR}/etc.i386/inst1.profile ${MOUNT}/.profile 358 install -c -o ${BINOWN} -g ${BINGRP} -m 755 \ 359 ${.CURDIR}/etc.i386/inst1.install ${MOUNT}/install 360 install -c -o ${BINOWN} -g ${BINGRP} -m 755 \ 361 filesystem ${MOUNT}/bin/filesystem 362 (cd ${MOUNT}/; \ 363 for i in ${FILESYSTEM_LINKS}; do \ 364 ln bin/filesystem $$i; \ 365 done) 366 (cd ${MOUNT}/; \ 367 ls ${FILESYSTEM_FILES} >/tmp/filelist; \ 368 ls ${FILESYSTEM_LINKS} >>/tmp/filelist; \ 369 ls -d ${FILESYSTEM_DIRS} >>/tmp/filelist; \ 370 find ${FILESYSTEM_TREES} >>/tmp/filelist; \ 371 sort -u -r /tmp/filelist >filelist; \ 372 rm /tmp/filelist) 373 df -ik ${MOUNT} 374 umount /dev/${FLOPPY} 375 fsck /dev/r${FLOPPY} 376 dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/filesyst.flp \ 377 bs=15b count=160 378 gzip --no-name -9 -c ${RELEASEDIR}/floppies/filesyst.flp \ 379 >${RELEASEDIR}/floppies/filesyst.flp.gz & 380 381cpio.flp: 382 disklabel -w -r ${FLOPPY} ${FLOPPY_TYPE} \ 383 ${DESTDIR}/usr/mdec/fdboot ${DESTDIR}/usr/mdec/bootfd 384 newfs -b 4096 -c 80 -f 512 -i 65536 -m 0 -o space \ 385 r${FLOPPY} ${FLOPPY_TYPE} 386 mount /dev/${FLOPPY} ${MOUNT} 387 chown ${BINOWN}.${BINGRP} ${MOUNT}/. 388 chmod 755 ${MOUNT}/. 389 (cd ${DESTDIR}/; \ 390 ls ${CPIO_FILES} | cpio -pdamuv ${MOUNT}) 391 # This ugliness is because the default termcap file is simply too 392 # big and we don't need such a hugh one for the initial installation, 393 # yet we want the symlink in /etc to point to the right place so we 394 # need to install the smaller one in the same location. Same goes 395 # for the elvis hackery; just trying to bum as many bytes as we can 396 # here, and that's rarely a very pretty process. 397 mv ${DESTDIR}/usr/share/misc/termcap ${DESTDIR}/usr/share/misc/otermcap 398 install -c -o ${BINOWN} -g ${BINGRP} -m 755 \ 399 ${.CURDIR}/termcap.small ${DESTDIR}/usr/share/misc/termcap 400 # Use cp so we don't destroy the links. 401 cp ${DESTDIR}/usr/bin/ex ${DESTDIR}/usr/bin/ex.bak 402 cp ${DESTDIR}/usr/bin/elvis ${DESTDIR}/usr/bin/ex 403 (cd ${DESTDIR}/; \ 404 (find ${CPIO_CPIO}; ls -d ${CPIO_CPIO_DIRS}) | \ 405 cpio -H newc --block-size=16 -oav | \ 406 gzip -9 >${MOUNT}/inst2.cpio.gz) 407 # cpio is done, put everything back in shape for the bindist. 408 mv ${DESTDIR}/usr/share/misc/otermcap ${DESTDIR}/usr/share/misc/termcap 409 cp ${DESTDIR}/usr/bin/ex.bak ${DESTDIR}/usr/bin/ex 410 rm ${DESTDIR}/usr/bin/ex.bak 411 install -c -o ${BINOWN} -g ${BINGRP} -m 755 \ 412 ${.CURDIR}/etc.i386/cpio.rc ${MOUNT}/rc 413 install -c -o ${BINOWN} -g ${BINGRP} -m 755 \ 414 ${.CURDIR}/etc.i386/cpio.install ${MOUNT}/install 415 install -c -o ${BINOWN} -g ${BINGRP} -m 755 \ 416 ${.CURDIR}/etc.i386/cpio.magic ${MOUNT}/magic 417 df -ik ${MOUNT} 418 umount /dev/${FLOPPY} 419 fsck /dev/r${FLOPPY} 420 dd if=/dev/r${FLOPPY} of=${RELEASEDIR}/floppies/cpio.flp \ 421 bs=15b count=160 422 gzip --no-name -9 -c ${RELEASEDIR}/floppies/cpio.flp \ 423 >${RELEASEDIR}/floppies/cpio.flp.gz & 424 425bin-tarball: 426 (cd ${DESTDIR}; \ 427 tar cf - . | \ 428 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/bindist/bin_tgz.) 429 430src-clean: 431 (cd ${DESTDIR}/usr/src; make cleandist) 432 find ${DESTDIR}/usr/src -name obj | xargs -n30 rm -rf 433 chown -R bin:bin ${DESTDIR}/usr/src 434 chmod -R og-w ${DESTDIR}/usr/src 435 436srcbase-tarball: 437 (cd ${DESTDIR}; \ 438 tar --exclude CVS -cf - usr/src/[A-Z]* | \ 439 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/base.) 440 441srcbin-tarball: 442 (cd ${DESTDIR}; \ 443 tar --exclude CVS -cf - usr/src/bin | \ 444 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/bin.) 445 446srccontrib-tarball: 447 (cd ${DESTDIR}; \ 448 tar --exclude CVS -cf - usr/src/contrib | \ 449 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/contrib.) 450 451srcetc-tarball: 452 (cd ${DESTDIR}; \ 453 tar --exclude CVS -cf - usr/src/etc | \ 454 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/etc.) 455 456srcgames-tarball: 457 (cd ${DESTDIR}; \ 458 tar --exclude CVS -cf - usr/src/games | \ 459 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/games.) 460 461srcgnu-tarball: 462 (cd ${DESTDIR}; \ 463 tar --exclude CVS -cf - usr/src/gnu | \ 464 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/gnu.) 465 466srcinclude-tarball: 467 (cd ${DESTDIR}; \ 468 tar --exclude CVS -cf - usr/src/include | \ 469 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/include.) 470 471srclib-tarball: 472 (cd ${DESTDIR}; \ 473 tar --exclude usr/src/${CRYPT_LIB} --exclude CVS -cf - \ 474 usr/src/lib | \ 475 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/lib.) 476 477srclibcrypt-tarball: 478 (cd ${DESTDIR}; \ 479 tar --exclude CVS -cf - usr/src/${CRYPT_LIB} | \ 480 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/secrdist/libcrypt.) 481 482srclibexec-tarball: 483 (cd ${DESTDIR}; \ 484 tar --exclude CVS -cf - usr/src/libexec | \ 485 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/libexec.) 486 487srcsbin-tarball: 488 (cd ${DESTDIR}; \ 489 tar --exclude CVS -cf - usr/src/sbin | \ 490 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/sbin.) 491 492srcshare-tarball: 493 (cd ${DESTDIR}; \ 494 tar --exclude CVS -cf - usr/src/share | \ 495 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/share.) 496 497srcsys-tarball: 498 (cd ${DESTDIR}; \ 499 tar --exclude CVS -cf - usr/src/sys | \ 500 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/sys.) 501 502srcusrbin-tarball: 503 (cd ${DESTDIR}; \ 504 tar --exclude CVS -cf - usr/src/usr.bin | \ 505 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/usrbin.) 506 507srcusrsbin-tarball: 508 (cd ${DESTDIR}; \ 509 tar --exclude CVS -cf - usr/src/usr.sbin | \ 510 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/srcdist/usrsbin.) 511 512src-tarball: src-clean srcbase-tarball srcbin-tarball srccontrib-tarball \ 513 srcetc-tarball srcgames-tarball srcgnu-tarball srcinclude-tarball \ 514 srclib-tarball srclibcrypt-tarball srclibexec-tarball srcsbin-tarball \ 515 srcshare-tarball srcsys-tarball srcusrbin-tarball srcusrsbin-tarball 516 517des-tarball: 518 rm -rf ${RELEASEDIR}/tmpdes 519 mkdir ${RELEASEDIR}/tmpdes 520 for i in ${CRYPT_DIRS}; do \ 521 cd ${RELEASEDIR}/tmpdes; \ 522 mkdir $$i; \ 523 chown ${BINOWN}.${GRPOWN} $$i; \ 524 chmod 755 $$i; \ 525 done 526 # This is ugly, it force installs a /usr/lib/libcrypt.a so 527 # that the other makes will be built with des. 528 # 529 (cd ${.CURDIR}/../${CRYPT_LIB}; \ 530 unset NOCRYPT; \ 531 DESTDIR=; export DESTDIR; \ 532 ${MAKE} cleandir obj depend all install; \ 533 NOMAN=noman; export NOMAN; \ 534 DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \ 535 ${MAKE} cleandir obj depend all install) 536 for i in ${CRYPT_SRCS}; do \ 537 unset NOCRYPT; \ 538 DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \ 539 NOMAN=noman; export NOMAN; \ 540 cd ${.CURDIR}/../$$i; \ 541 ${MAKE} cleandir obj depend all install; \ 542 done 543 (cd ${RELEASEDIR}/tmpdes; \ 544 tar cf - . | \ 545 ${ZIPNSPLIT} ${RELEASEDIR}/tarballs/secrdist/des_tgz.) 546 rm -rf ${RELEASEDIR}/tmpdes 547 548distrib-dirs: 549 mtree -u -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ 550 mtree -u -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var 551 mtree -u -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr 552.if defined(CDROMDIST) 553 mtree -u -f ${.CURDIR}/mtree/BSD.local.dist -p ${DESTDIR}/usr/local 554.endif 555 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys 556 557floppies: kcopy_ah.flp kcopy_bt.flp filesyst.flp cpio.flp \ 558 cdins_ah.flp cdins_bt.flp 559 560release: release-dirs distribution crunch extract kcopy-kernels \ 561 floppies bin-tarball des-tarball clean 562 563release-dirs: 564 rm -rf ${RELEASEDIR}/filesys 565 mkdir ${RELEASEDIR}/filesys 566 chown ${BINOWN}.${BINGRP} ${RELEASEDIR}/filesys 567 chmod 755 ${RELEASEDIR}/filesys 568 rm -rf ${RELEASEDIR}/tarballs 569 mkdir ${RELEASEDIR}/tarballs 570 mkdir ${RELEASEDIR}/tarballs/bindist 571 mkdir ${RELEASEDIR}/tarballs/objdist 572 mkdir ${RELEASEDIR}/tarballs/secrdist 573 mkdir ${RELEASEDIR}/tarballs/srcdist 574 chown -R ${BINOWN}.${BINGRP} ${RELEASEDIR}/tarballs 575 chmod -R 755 ${RELEASEDIR}/tarballs 576 rm -rf ${RELEASEDIR}/floppies 577 mkdir ${RELEASEDIR}/floppies 578 chown ${BINOWN}.${BINGRP} ${RELEASEDIR}/floppies 579 chmod 755 ${RELEASEDIR}/floppies 580 581.include <bsd.prog.mk> 582