1# @(#)Makefile 5.11 (Berkeley) 5/21/91 2 3NOOBJ= noobj 4 5# disktab may be wrong -- hcx9 is a tahoe, but gets its own. 6# -rw-r--r-- 7BINOWN= root 8BINGRP= wheel 9BIN1= aliases csh.cshrc csh.login csh.logout dm.conf \ 10 ftpusers gettytab group hosts host.conf hosts.equiv hosts.lpd \ 11 inetd.conf motd myname netstart phones \ 12 printcap protocols rc rc.local remote security services shells \ 13 syslog.conf ttys etc.${MACHINE}/disktab rpc 14 15# -rw-rw-rw- 16BIN2= motd 17 18# -rwxr-xr-x root.wheel, for the new f***ing cron root.wheel 19BIN3= daily weekly monthly 20 21MTREE= BSD.root.dist BSD.usr.dist BSD.var.dist 22NAMEDB= localhost.rev named.boot root.cache 23PCS= pcs750.bin 24WCS1= wcs fppwcs poc poc1 poc2 fppoc 25WCS2= fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual 26 27# Special top level files for FreeBSD 28COPYRIGHT= COPYRIGHT 29FREEBSD= CONTRIB.386BSD CONTRIB.FreeBSD RELNOTES.FreeBSD ${COPYRIGHT} 30# 31# Floppy drive name and files for building FreeBSD Floppies 32FLOPPY?= fd0 33MOUNT= /mnt 34# 35MDEC= usr/mdec/bootfd usr/mdec/fdboot 36MDEC+= usr/mdec/bootsd usr/mdec/sdboot 37MDEC+= usr/mdec/bootwd usr/mdec/wdboot 38# 39KC_DIRS= dev mnt 40KC_FILES= ${COPYRIGHT} 41KC_FILES+= bin/[ bin/cp bin/echo bin/sh bin/test 42KC_FILES+= sbin/fsck sbin/halt sbin/init sbin/mount sbin/umount 43# 44FILESYSTEM_DIRS= bin dev etc mnt sbin usr usr/bin usr/mdec usr/sbin 45FILESYSTEM_TREES= dev 46FILESYSTEM_FILES= ${COPYRIGHT} 47FILESYSTEM_FILES+= bin/[ bin/cat bin/expr bin/ls bin/mkdir 48FILESYSTEM_FILES+= bin/df 49FILESYSTEM_FILES+= bin/sh bin/sync bin/test 50FILESYSTEM_FILES+= dev/MAKEDEV dev/MAKEDEV.local 51FILESYSTEM_FILES+= etc/group 52FILESYSTEM_FILES+= etc/master.passwd etc/passwd etc/pwd.db etc/spwd.db 53FILESYSTEM_FILES+= sbin/disklabel sbin/halt sbin/init 54FILESYSTEM_FILES+= sbin/mount sbin/mount_isofs sbin/mount_pcfs 55FILESYSTEM_FILES+= sbin/newfs 56#FILESYSTEM_FILES+= sbin/reboot 57FILESYSTEM_FILES+= sbin/umount 58FILESYSTEM_FILES+= usr/bin/cpio 59FILESYSTEM_FILES+= ${MDEC} 60FILESYSTEM_FILES+= usr/sbin/bad144 61 62CPIO_FILES= ${COPYRIGHT} 63CPIO_FILES+= usr/bin/gunzip usr/bin/gzcat usr/bin/gzip usr/bin/zcat 64CPIO_CPIO= bin/chmod bin/cp bin/dd bin/mv bin/pwd bin/rm bin/stty 65CPIO_CPIO+= etc/protocols etc/services 66CPIO_CPIO+= sbin/ifconfig sbin/fsck sbin/mknod 67CPIO_CPIO+= sbin/route sbin/slattach 68CPIO_CPIO+= tmp 69CPIO_CPIO+= usr/bin/awk usr/bin/chgrp usr/bin/ftp 70CPIO_CPIO+= usr/bin/more usr/bin/tar usr/bin/tip 71CPIO_CPIO+= usr/bin/elvis usr/bin/ex usr/bin/vi usr/bin/view 72#CPIO_CPIO+= usr/local/bin/mread usr/local/bin/rz 73CPIO_CPIO+= usr/sbin/update usr/sbin/chown 74CPIO_CPIO+= var 75 76CRYPT_LIB= lib/libcrypt 77CRYPT_SRCS= bin/ed bin/rcp 78CRYPT_SRCS+= libexec/ftpd libexec/makekey libexec/rexecd libexec/rlogind 79CRYPT_SRCS+= libexec/rshd libexec/telnetd libexec/uucpd 80CRYPT_SRCS+= usr.bin/bdes usr.bin/lock usr.bin/login usr.bin/passwd 81CRYPT_SRCS+= usr.bin/rlogin usr.bin/rsh usr.bin/su usr.bin/telnet 82CRYPT_DIRS= bin usr usr/bin usr/lib usr/libexec 83 84all clean cleandir depend etc install lint: 85 86crypt: 87 rm -f ${LIBCRYPT}; 88 (cd ${.CURDIR}/../${CRYPT_LIB}; \ 89 ${MAKE} cleandir obj depend all install) 90 for i in ${CRYPT_SRCS}; do \ 91 cd ${.CURDIR}/../$$i; \ 92 ${MAKE} cleandir obj depend all; \ 93 done 94 95non-crypt: 96 rm -f ${LIBCRYPT} 97 for i in ${CRYPT_SRCS}; do \ 98 cd ${.CURDIR}/../$$i; \ 99 ${MAKE} cleandir obj depend all; \ 100 done 101 102distribution: distrib-dirs 103 install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc 104 install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc 105 install -c -o root -g wheel -m 755 ${BIN3} ${DESTDIR}/etc 106 install -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root 107 install -c -o root -g wheel -m 600 /dev/null ${DESTDIR}/var/cron/log 108 install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc 109 pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd 110 install -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 111 MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev 112.if defined(CDROMDIST) 113 (cd ${DESTDIR}/dev; sh MAKEDEV all) 114.endif 115 (cd root; \ 116 install -c -o root -g wheel -m 644 dot.cshrc \ 117 ${DESTDIR}/root/.cshrc; \ 118 install -c -o root -g wheel -m 644 dot.klogin \ 119 ${DESTDIR}/root/.klogin; \ 120 install -c -o root -g wheel -m 644 dot.login \ 121 ${DESTDIR}/root/.login; \ 122 install -c -o root -g wheel -m 644 dot.profile \ 123 ${DESTDIR}/root/.profile; \ 124 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 125 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 126 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile) 127 cd mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${MTREE} \ 128 ${DESTDIR}/etc/mtree 129 cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \ 130 ${DESTDIR}/etc/namedb 131 install -c -o ${BINOWN} -g operator -m 664 /dev/null \ 132 ${DESTDIR}/etc/dumpdates 133 install -c -o nobody -g ${BINGRP} -m 664 /dev/null \ 134 ${DESTDIR}/var/db/locate.database 135 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 136 ${DESTDIR}/var/log/lpd-errs 137 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 138 ${DESTDIR}/var/log/maillog 139 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 140 ${DESTDIR}/var/log/lastlog 141 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 142 ${DESTDIR}/var/log/messages 143 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 144 ${DESTDIR}/var/log/wtmp 145 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 146 ${DESTDIR}/var/run/utmp 147 (cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \ 148 fstab.* ${DESTDIR}/etc) 149.if defined(NOCRYPT) 150 ${MAKE} non-crypt 151 (cd ..; NOCRYPT=nocrypt; export NOCRYPT; ${MAKE} install) 152.else 153 ${MAKE} crypt 154 (cd ..; ${MAKE} install) 155.endif 156 (cd ../usr.sbin/sendmail/src; \ 157 ${MAKE} install; \ 158 cd ../cf/cf; \ 159 ${MAKE} tcpproto.cf; \ 160 install -o root -g wheel -m 644 tcpproto.cf \ 161 ${DESTDIR}/etc/sendmail.cf) 162 (cd ../; \ 163 install -c -o root -g wheel -m 444 ${FREEBSD} ${DESTDIR}/) 164 (cd ..; ${MAKE} mdec; ) 165.if ${MACHINE} == "tahoe" 166 (cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \ 167 ${DESTDIR}/) 168.endif 169.if ${MACHINE} == "vax" 170 (cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \ 171 ${DESTDIR}/) 172.endif 173 174hcx9-distribution: 175 (cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \ 176 ${DESTDIR}/) 177 178kcopy-kernels: ../sys/i386/conf/GENERICAH ../sys/i386/conf/GENERICBT 179 (cd ../sys/compile; rm -rf GENERICAH GENERICBT) 180 (cd ../sys/i386/conf; config GENERICAH; config GENERICBT) 181 (cd ../sys/compile/GENERICAH; ${MAKE} depend; ${MAKE} all; \ 182 install -c -o root -g wheel -m 755 386bsd \ 183 ${DESTDIR}/386bsd.GENERICAH) 184 (cd ../sys/compile/GENERICBT; ${MAKE} depend; ${MAKE} all; \ 185 install -c -o root -g wheel -m 755 386bsd \ 186 ${DESTDIR}/386bsd.GENERICBT) 187 188kcopy-floppy: 189 disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd 190 newfs -b 4096 -c 80 -f 512 -i 16384 -m 0 -o space r${FLOPPY}a floppy5 191 mount /dev/${FLOPPY}a ${MOUNT} 192 chown root.wheel ${MOUNT}/. 193 chmod 755 ${MOUNT}/. 194 (cd ${DESTDIR}/; \ 195 ls -d ${KC_DIRS} | cpio -pdamuv ${MOUNT}) 196 (cd ${MOUNT}/dev; \ 197 sh ${DESTDIR}/dev/MAKEDEV std; \ 198 rm -rf fd; \ 199 sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0 sd1) 200 (cd ${DESTDIR}/; \ 201 ls ${KC_FILES} | cpio -pdamuv ${MOUNT}) 202 install -c -o root -g wheel -m 755 etc.i386/kc.profile \ 203 ${MOUNT}/.profile 204 205kcopy-ah-floppy: 206 ${MAKE} kcopy-floppy 207 (cd ../sys/compile/GENERICAH; \ 208 install -c -o root -g wheel -m 755 386bsd ${MOUNT}/) 209 df -ik ${MOUNT} 210 umount /dev/${FLOPPY}a 211 fsck /dev/r${FLOPPY}a 212 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/kcopy-ah-floppy \ 213 bs=15b count=160 214 gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy-ah-floppy \ 215 >${RELEASEDIR}/floppies/kcopy-ah-floppy.gz 216 217kcopy-bt-floppy: 218 ${MAKE} kcopy-floppy 219 (cd ../sys/compile/GENERICBT; \ 220 install -c -o root -g wheel -m 755 386bsd ${MOUNT}/) 221 df -ik ${MOUNT} 222 umount /dev/${FLOPPY}a 223 fsck /dev/r${FLOPPY}a 224 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/kcopy-bt-floppy \ 225 bs=15b count=160 226 gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy-bt-floppy \ 227 >${RELEASEDIR}/floppies/kcopy-bt-floppy.gz 228 229filesystem-floppy: 230 disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd 231 newfs -b 4096 -c 80 -f 512 -i 10240 -m 0 -o space r${FLOPPY}a floppy5 232 mount /dev/${FLOPPY}a ${MOUNT} 233 chown root.wheel ${MOUNT}/. 234 chmod 755 ${MOUNT}/. 235 (cd ${DESTDIR}/; \ 236 ls -d ${FILESYSTEM_DIRS} | cpio -pdamuv ${MOUNT}) 237 (cd ${MOUNT}/dev; \ 238 sh ${DESTDIR}/dev/MAKEDEV std; \ 239 rm -rf fd; \ 240 sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0 sd1) 241 (cd ${DESTDIR}/; \ 242 ls ${FILESYSTEM_FILES} | cpio -pdamuv ${MOUNT}) 243 install -c -o root -g wheel -m 755 etc.i386/inst1.profile \ 244 ${MOUNT}/.profile 245 install -c -o root -g wheel -m 755 etc.i386/inst1.install \ 246 ${MOUNT}/install 247 (cd ${MOUNT}/; \ 248 ls ${FILESYSTEM_FILES} >/tmp/filelist; \ 249 ls -d ${FILESYSTEM_DIRS} >>/tmp/filelist; \ 250 find ${FILESYSTEM_TREES} >>/tmp/filelist; \ 251 sort -u /tmp/filelist >filelist; \ 252 rm /tmp/filelist) 253 df -ik ${MOUNT} 254 umount /dev/${FLOPPY}a 255 fsck /dev/r${FLOPPY}a 256 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/filesystem-floppy \ 257 bs=15b count=160 258 gzip --no-name -9 -c ${RELEASEDIR}/floppies/filesystem-floppy \ 259 >${RELEASEDIR}/floppies/filesystem-floppy.gz 260 261cpio-floppy: 262 disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd 263 newfs -b 4096 -c 80 -f 512 -i 65536 -m 0 -o space r${FLOPPY}a floppy5 264 mount /dev/${FLOPPY}a ${MOUNT} 265 chown root.wheel ${MOUNT}/. 266 chmod 755 ${MOUNT}/. 267 (cd ${DESTDIR}/; \ 268 ls ${CPIO_FILES} | cpio -pdamuv ${MOUNT}) 269 (cd ${DESTDIR}/; \ 270 find ${CPIO_CPIO} | cpio -oav | gzip -9 >${MOUNT}/inst2.cpio.gz) 271 install -c -o root -g wheel -m 755 etc.i386/inst2.profile \ 272 ${MOUNT}/.profile 273 install -c -o root -g wheel -m 755 etc.i386/inst2.install \ 274 ${MOUNT}/install 275 df -ik ${MOUNT} 276 umount /dev/${FLOPPY}a 277 fsck /dev/r${FLOPPY}a 278 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/cpio-floppy \ 279 bs=15b count=160 280 gzip --no-name -9 -c ${RELEASEDIR}/floppies/cpio-floppy \ 281 >${RELEASEDIR}/floppies/cpio-floppy.gz 282 283bin-tarball: 284 (cd ${DESTDIR}; \ 285 tar cf - . | gzip --no-name -9 -c | \ 286 split -b 240640 - \ 287 ${RELEASEDIR}/tarballs/bin.tar.gz.) 288 289des-tarball: 290 rm -rf ${RELEASEDIR}/tmpdes 291 mkdir ${RELEASEDIR}/tmpdes 292 for i in ${CRYPT_DIRS}; do \ 293 cd ${RELEASEDIR}/tmpdes; \ 294 mkdir $$i; \ 295 chown ${BINOWN}.${GRPOWN} $$i; \ 296 chmod 755 $$i; \ 297 done 298 # This is ugly, it force installs a /usr/lib/libcrypt.a so 299 # that the other makes will be built with des. 300 # 301 (cd ${.CURDIR}/../${CRYPT_LIB}; \ 302 unset NOCRYPT; \ 303 DESTDIR=; export DESTDIR; \ 304 ${MAKE} cleandir obj depend all install; \ 305 NOMAN=noman; export NOMAN; \ 306 DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \ 307 ${MAKE} cleandir obj depend all install) 308 for i in ${CRYPT_SRCS}; do \ 309 unset NOCRYPT; \ 310 DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \ 311 NOMAN=noman; export NOMAN; \ 312 cd ${.CURDIR}/../$$i; \ 313 ${MAKE} cleandir obj depend all install; \ 314 done 315 (cd ${RELEASEDIR}/tmpdes; \ 316 tar cf - . | gzip --no-name -9 -c | \ 317 split -b 240640 - \ 318 ${RELEASEDIR}/tarballs/des.tar.gz.) 319 rm -rf ${RELEASEDIR}/tmpdes 320 321distrib-dirs: 322 mtree -u -f mtree/BSD.root.dist -p ${DESTDIR}/ 323 mtree -u -f mtree/BSD.var.dist -p ${DESTDIR}/var 324 mtree -u -f mtree/BSD.usr.dist -p ${DESTDIR}/usr 325.if defined(CDROMDIST) 326 mtree -u -f mtree/BSD.local.dist -p ${DESTDIR}/usr/local 327.endif 328 cd ${DESTDIR}; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys 329 330floppies: kcopy-ah-floppy kcopy-bt-floppy filesystem-floppy \ 331 cpio-floppy 332 333release: release-dirs distribution kcopy-kernels floppies bin-tarball des-tarball 334 335release-dirs: 336 rm -rf ${RELEASEDIR}/filesystem 337 mkdir ${RELEASEDIR}/filesystem 338 chown root.wheel ${RELEASEDIR}/filesystem 339 chmod 755 ${RELEASEDIR}/filesystem 340 rm -rf ${RELEASEDIR}/tarballs 341 mkdir ${RELEASEDIR}/tarballs 342 chown root.wheel ${RELEASEDIR}/tarballs 343 chmod 755 ${RELEASEDIR}/tarballs 344 rm -rf ${RELEASEDIR}/floppies 345 mkdir ${RELEASEDIR}/floppies 346 chown root.wheel ${RELEASEDIR}/floppies 347 chmod 755 ${RELEASEDIR}/floppies 348 349.include <bsd.prog.mk> 350