Makefile revision 288
137Srgrimes# @(#)Makefile 5.11 (Berkeley) 5/21/91 237Srgrimes 3147SrgrimesLOCALTIME= US/Pacific 4147SrgrimesTZDIR=/usr/share/zoneinfo 5147Srgrimes 637SrgrimesNOOBJ= oobj 737Srgrimes 837Srgrimes# disktab may be wrong -- hcx9 is a tahoe, but gets its own. 937Srgrimes# -rw-r--r-- 10147SrgrimesBINOWN= root 11147SrgrimesBINGRP= wheel 12147SrgrimesBIN1= aliases csh.cshrc csh.login csh.logout dm.conf \ 13207Snate ftpusers gettytab group hosts host.conf hosts.equiv hosts.lpd \ 14258Srgrimes inetd.conf motd myname netstart phones \ 15147Srgrimes printcap protocols rc rc.local remote security services shells \ 16147Srgrimes syslog.conf ttys etc.${MACHINE}/disktab rpc 1737Srgrimes 1837Srgrimes# -rw-rw-rw- 1937SrgrimesBIN2= motd 2037Srgrimes 21147Srgrimes# -rwxr-xr-x root.wheel, for the new f***ing cron root.wheel 22147SrgrimesBIN3= daily weekly monthly 23147Srgrimes 2437SrgrimesMTREE= BSD.root.dist BSD.usr.dist BSD.var.dist 2537SrgrimesNAMEDB= localhost.rev named.boot root.cache 2637SrgrimesPCS= pcs750.bin 2737SrgrimesWCS1= wcs fppwcs poc poc1 poc2 fppoc 2837SrgrimesWCS2= fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual 2937Srgrimes 30263Srgrimes# Special top level files for FreeBSD 31284SrgrimesCOPYRIGHT= COPYRIGHT 32284SrgrimesFREEBSD= CONTRIB.386BSD CONTRIB.FreeBSD ${COPYRIGHT} 33277Srgrimes# 34277Srgrimes# Floppy drive name and files for building FreeBSD Floppies 35284SrgrimesFLOPPY?= fd0 36284SrgrimesMOUNT= /mnt 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# 47284SrgrimesINST1_DIRS= dev mnt 48284SrgrimesINST1_FILES= ${COPYRIGHT} 49284SrgrimesINST1_FILES+= bin/[ bin/cat bin/df bin/expr bin/ls bin/mkdir 50284SrgrimesINST1_FILES+= bin/sh bin/sync bin/test 51284SrgrimesINST1_FILES+= dev/MAKEDEV dev/MAKEDEV.local 52284SrgrimesINST1_FILES+= etc/disktab etc/group etc/master.passwd etc/passwd 53284SrgrimesINST1_FILES+= etc/pwd.db etc/spwd.db 54284SrgrimesINST1_FILES+= sbin/disklabel sbin/halt sbin/init sbin/mount sbin/umount 55284SrgrimesINST1_FILES+= sbin/newfs sbin/reboot 56284SrgrimesINST1_FILES+= usr/bin/cpio 57284SrgrimesINST1_FILES+= ${MDEC} 58284SrgrimesINST1_FILES+= usr/sbin/bad144 59263Srgrimes 60284SrgrimesINST2_FILES= ${COPYRIGHT} 61284SrgrimesINST2_FILES+= usr/bin/gunzip usr/bin/gzcat usr/bin/gzip usr/bin/zcat 62284SrgrimesINST2_CPIO= bin/chmod bin/cp bin/dd bin/mv bin/pwd bin/rm bin/stty 63284SrgrimesINST2_CPIO+= etc/protocols etc/services 64284SrgrimesINST2_CPIO+= sbin/ifconfig sbin/fsck sbin/mknod 65284Srgrimes#INST2_CPIO+= sbin/mount_pcfs sbin/mount_isofs 66284SrgrimesINST2_CPIO+= sbin/route sbin/shutdown sbin/slattach 67284SrgrimesINST2_CPIO+= tmp 68284SrgrimesINST2_CPIO+= usr/bin/awk usr/bin/chgrp usr/bin/ftp 69284SrgrimesINST2_CPIO+= usr/bin/more usr/bin/tar usr/bin/tip usr/bin/zcat 70284SrgrimesINST2_CPIO+= usr/bin/elvis usr/bin/ex usr/bin/vi usr/bin/view 71284Srgrimes#INST2_CPIO+= usr/local/bin/mread usr/local/bin/rz 72284SrgrimesINST2_CPIO+= usr/sbin/update usr/sbin/chown 73284SrgrimesINST2_CPIO+= var 74284Srgrimes 7537Srgrimesall clean cleandir depend etc install lint: 7637Srgrimes 77147Srgrimesdistribution: distrib-dirs 7837Srgrimes install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc 7937Srgrimes install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc 80147Srgrimes install -c -o root -g wheel -m 755 ${BIN3} ${DESTDIR}/etc 81147Srgrimes install -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root 82238Sroot install -c -o root -g wheel -m 600 /dev/null ${DESTDIR}/var/cron/log 8337Srgrimes install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc 84163Srgrimes # 85238Sroot # This is broken, it always does /etc. It IGNORES the ${DESTDIR} for 86163Srgrimes # where to write the spwd.db pwd.db files. 87163Srgrimes #(cd ${DESTDIR}/etc; pwd_mkdb -p master.passwd) 88163Srgrimes # 89163Srgrimes # Work around for above problem. 90163Srgrimes install -c -o root -g wheel -m 644 pwd.db ${DESTDIR}/etc 91163Srgrimes install -c -o root -g wheel -m 600 spwd.db ${DESTDIR}/etc 92284Srgrimes install -c -o root -g wheel -m 644 passwd ${DESTDIR}/etc 9337Srgrimes install -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 9437Srgrimes MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev 95147Srgrimes (cd ${DESTDIR}/dev; sh MAKEDEV all) 9637Srgrimes (cd root; \ 9737Srgrimes install -c -o root -g wheel -m 644 dot.cshrc \ 9837Srgrimes ${DESTDIR}/root/.cshrc; \ 9937Srgrimes install -c -o root -g wheel -m 644 dot.klogin \ 10037Srgrimes ${DESTDIR}/root/.klogin; \ 10137Srgrimes install -c -o root -g wheel -m 644 dot.login \ 10237Srgrimes ${DESTDIR}/root/.login; \ 10337Srgrimes install -c -o root -g wheel -m 644 dot.profile \ 10437Srgrimes ${DESTDIR}/root/.profile; \ 10537Srgrimes rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 10637Srgrimes ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 10737Srgrimes ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile) 10837Srgrimes cd mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${MTREE} \ 10937Srgrimes ${DESTDIR}/etc/mtree 11037Srgrimes cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \ 11137Srgrimes ${DESTDIR}/etc/namedb 112147Srgrimes /bin/rm -f ${DESTDIR}/etc/localtime 113147Srgrimes ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime 11437Srgrimes install -c -o ${BINOWN} -g operator -m 664 /dev/null \ 11537Srgrimes ${DESTDIR}/etc/dumpdates 116147Srgrimes install -c -o nobody -g ${BINGRP} -m 664 /dev/null \ 117147Srgrimes ${DESTDIR}/var/db/locate.database 11837Srgrimes install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 119147Srgrimes ${DESTDIR}/var/log/lpd-errs 12037Srgrimes install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 12137Srgrimes ${DESTDIR}/var/log/maillog 12237Srgrimes install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 123288Srgrimes ${DESTDIR}/var/log/lastlog 124288Srgrimes install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 125147Srgrimes ${DESTDIR}/var/log/messages 12637Srgrimes install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 127147Srgrimes ${DESTDIR}/var/log/wtmp 128147Srgrimes install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 12937Srgrimes ${DESTDIR}/var/run/utmp 13037Srgrimes (cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \ 131147Srgrimes fstab.* ${DESTDIR}/etc) 13237Srgrimes.if ${MACHINE} == "tahoe" 13337Srgrimes (cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \ 13437Srgrimes ${DESTDIR}/) 13537Srgrimes.endif 13637Srgrimes.if ${MACHINE} == "vax" 13737Srgrimes (cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \ 13837Srgrimes ${DESTDIR}/) 13937Srgrimes.endif 140168Srgrimes.if ${MACHINE} == "i386" 141277Srgrimes (cd ../sys/i386/boot; \ 142277Srgrimes make depend all install cleandir) 143284Srgrimes (cd /; \ 144284Srgrimes ls ${MDEC} | cpio -pdalmuv ${DESTDIR}/) 145277Srgrimes (cd ../usr.sbin/sendmail/src; \ 146277Srgrimes make install; \ 147277Srgrimes cd ../cf/cf; \ 148277Srgrimes make tcpproto.cf; \ 149238Sroot install -o root -g wheel -m 644 tcpproto.cf \ 150238Sroot ${DESTDIR}/etc/sendmail.cf) 151277Srgrimes (cd ../; \ 152277Srgrimes install -c -o root -g wheel -m 444 ${FREEBSD} ${DESTDIR}/) 153168Srgrimes (cd ..; make install) 154286Srgrimes # the above make install clobers the /etc/localtime link 155286Srgrimes /bin/rm -f ${DESTDIR}/etc/localtime 156286Srgrimes ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime 157286Srgrimes /bin/rm -f ${DESTDIR}/etc/termcap 158286Srgrimes ln -s /usr/share/misc/termcap ${DESTDIR}/etc/termcap 159277Srgrimes (cd ../sys/compile; rm -rf GENERICISA) 160277Srgrimes (cd ../sys/i386/conf; config GENERICISA) 161277Srgrimes (cd ../sys/compile/GENERICISA; make depend; make all; \ 162277Srgrimes install -c -o root -g wheel -m 755 386bsd \ 163277Srgrimes ${DESTDIR}/386bsd.GENERICISA) 164266Srgrimes (cd ../include; make copies) 165168Srgrimes.endif 16637Srgrimes 16737Srgrimeshcx9-distribution: 16837Srgrimes (cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \ 16937Srgrimes ${DESTDIR}/) 17037Srgrimes 171284Srgrimeskc-ah-floppy: 172277Srgrimes disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd 173277Srgrimes newfs -b 4096 -c 80 -f 512 -i 16384 -m 0 -o space r${FLOPPY}a floppy5 174277Srgrimes mount /dev/${FLOPPY}a ${MOUNT} 175284Srgrimes (cd ${DESTDIR}/; \ 176284Srgrimes ls -d ${KC_DIRS} | cpio -pdalmuv ${MOUNT}) 177277Srgrimes (cd ${MOUNT}/dev; \ 178277Srgrimes sh ${DESTDIR}/dev/MAKEDEV std; \ 179277Srgrimes rm -rf fd; \ 180277Srgrimes sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0) 181284Srgrimes (cd ${DESTDIR}/; \ 182284Srgrimes ls ${KC_FILES} | cpio -pdalmuv ${MOUNT}) 183277Srgrimes install -c -o root -g wheel -m 755 etc.i386/kc.profile \ 184277Srgrimes ${MOUNT}/.profile 185277Srgrimes (cd ../sys/compile/GENERICISA; \ 186277Srgrimes install -c -o root -g wheel -m 755 386bsd ${MOUNT}/) 187277Srgrimes df -ik ${MOUNT} 188277Srgrimes umount /dev/${FLOPPY}a 189277Srgrimes fsck /dev/r${FLOPPY}a 190277Srgrimes 191284Srgrimesinst1-floppy: 192284Srgrimes disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd 193284Srgrimes newfs -b 4096 -c 80 -f 512 -i 10240 -m 0 -o space r${FLOPPY}a floppy5 194284Srgrimes mount /dev/${FLOPPY}a ${MOUNT} 195284Srgrimes (cd ${DESTDIR}/; \ 196284Srgrimes ls -d ${INST1_DIRS} | cpio -pdalmuv ${MOUNT}) 197284Srgrimes (cd ${MOUNT}/dev; \ 198284Srgrimes sh ${DESTDIR}/dev/MAKEDEV std; \ 199284Srgrimes rm -rf fd; \ 200284Srgrimes sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0) 201284Srgrimes (cd ${DESTDIR}/; \ 202284Srgrimes ls ${INST1_FILES} | cpio -pdalmuv ${MOUNT}) 203284Srgrimes install -c -o root -g wheel -m 755 etc.i386/inst1.profile \ 204284Srgrimes ${MOUNT}/.profile 205284Srgrimes install -c -o root -g wheel -m 755 etc.i386/inst1.install \ 206284Srgrimes ${MOUNT}/install 207284Srgrimes (cd ${MOUNT}/; \ 208284Srgrimes ls ${INST1_FILES} >/tmp/filelist; \ 209284Srgrimes find ${INST1_DIRS} | sort >>/tmp/filelist; \ 210284Srgrimes sort -u /tmp/filelist >filelist) 211284Srgrimes df -ik ${MOUNT} 212284Srgrimes umount /dev/${FLOPPY}a 213284Srgrimes fsck /dev/r${FLOPPY}a 214284Srgrimes 215284Srgrimesinst2-floppy: 216284Srgrimes disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd 217284Srgrimes newfs -b 4096 -c 80 -f 512 -i 65536 -m 0 -o space r${FLOPPY}a floppy5 218284Srgrimes mount /dev/${FLOPPY}a ${MOUNT} 219284Srgrimes (cd ${DESTDIR}/; \ 220284Srgrimes ls ${INST2_FILES} | cpio -pdalmuv ${MOUNT}) 221284Srgrimes (cd ${DESTDIR}/; \ 222284Srgrimes find ${INST2_CPIO} | cpio -odalmuv | gzip -9 >${MOUNT}/inst2.cpio.gz) 223284Srgrimes install -c -o root -g wheel -m 755 etc.i386/inst2.profile \ 224284Srgrimes ${MOUNT}/.profile 225284Srgrimes install -c -o root -g wheel -m 755 etc.i386/inst2.install \ 226284Srgrimes ${MOUNT}/install 227284Srgrimes df -ik ${MOUNT} 228284Srgrimes umount /dev/${FLOPPY}a 229284Srgrimes fsck /dev/r${FLOPPY}a 230284Srgrimes 231147Srgrimesdistrib-dirs: 232238Sroot mtree -u -f mtree/BSD.root.dist -p ${DESTDIR}/ 233147Srgrimes mtree -u -f mtree/BSD.var.dist -p ${DESTDIR}/var 234147Srgrimes mtree -u -f mtree/BSD.usr.dist -p ${DESTDIR}/usr 235147Srgrimes (cd ${DESTDIR}; rm -f ${DESTDIR}/sys; \ 236196Snate ln -s usr/src/sys sys ) 237147Srgrimes 23837Srgrimes.include <bsd.prog.mk> 239