Makefile revision 1.67
1# $OpenBSD: Makefile,v 1.67 1997/09/04 01:12:22 deraadt Exp $ 2 3TZDIR= /usr/share/zoneinfo 4LOCALTIME= US/Pacific 5 6NOOBJ= oobj 7 8.if exists(etc.${MACHINE}/Makefile.inc) 9.include "etc.${MACHINE}/Makefile.inc" 10.endif 11 12# -rw-r--r-- 13BINOWN= root 14BINGRP= wheel 15BIN1= aliases bootptab changelist ccd.conf csh.cshrc csh.login csh.logout \ 16 daily dm.conf exports ftpusers ftpchroot gettytab group hosts \ 17 hosts.equiv hosts.lpd ifaliases inetd.conf ipf.rules ksh.kshrc \ 18 locate.rc man.conf monthly motd mrouted.conf myname nat.rules \ 19 netstart networks newsyslog.conf passwd.conf phones printcap \ 20 protocols rbootd.conf rc rc.conf rc.local rc.securelevel remote rpc security \ 21 services shells syslog.conf weekly etc.${MACHINE}/disktab 22 23# -rw-rw-r-- 24BIN2= motd 25 26NAMEDB= localhost.rev named.boot root.cache 27PCS= pcs750.bin 28WCS1= wcs fppwcs poc poc1 poc2 fppoc 29WCS2= fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual 30 31# Use NOGZIP on architectures where the gzip'ing would take too much time 32# (pmax or slower :-)). This way you get only tar'ed snap files and you can 33# gzip them on a faster machine 34.ifndef NOGZIP 35GZIP?= gzip 36GZIPFLAGS?= -9 37GZIPEXT?= .gz 38.else 39GZIP= cat 40GZIPFLAGS= 41GZIPEXT= 42.endif 43 44all clean cleandir depend etc install lint: 45 46.ifndef DESTDIR 47distribution-etc-root-var distribution distrib-dirs release snapshot: 48 @echo setenv DESTDIR before doing that! 49 @false 50.else 51distribution-etc-root-var: distrib-dirs 52 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc 53 /usr/sbin/sendmail -bi -O AliasFile=${DESTDIR}/etc/aliases 54 cat etc.${MACHINE}/ttys ttys.pty > ${DESTDIR}/etc/ttys && \ 55 chown ${BINOWN} ${DESTDIR}/etc/ttys && \ 56 chgrp ${BINGRP} ${DESTDIR}/etc/ttys && \ 57 chmod 644 ${DESTDIR}/etc/ttys 58 cat fbtab.head etc.${MACHINE}/fbtab fbtab.tail > ${DESTDIR}/etc/fbtab && \ 59 chown ${BINOWN} ${DESTDIR}/etc/fbtab && \ 60 chgrp ${BINGRP} ${DESTDIR}/etc/fbtab && \ 61 chmod 644 ${DESTDIR}/etc/fbtab 62 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc 63 ${INSTALL} -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root 64 ${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc 65 pwd_mkdb -p -d ${DESTDIR}/etc /etc/master.passwd 66 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 67 MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev 68 (cd root; \ 69 ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \ 70 ${DESTDIR}/root/.cshrc; \ 71 ${INSTALL} -c -o root -g wheel -m 644 dot.klogin \ 72 ${DESTDIR}/root/.klogin; \ 73 ${INSTALL} -c -o root -g wheel -m 644 dot.login \ 74 ${DESTDIR}/root/.login; \ 75 ${INSTALL} -c -o root -g wheel -m 644 dot.profile \ 76 ${DESTDIR}/root/.profile; \ 77 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 78 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 79 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile) 80 (cd kerberosIV; \ 81 ${INSTALL} -c -o root -g wheel -m 644 README \ 82 ${DESTDIR}/etc/kerberosIV; \ 83 ${INSTALL} -c -o root -g wheel -m 644 krb.conf \ 84 ${DESTDIR}/etc/kerberosIV; \ 85 ${INSTALL} -c -o root -g wheel -m 444 krb.realms \ 86 ${DESTDIR}/etc/kerberosIV) 87 (cd amd; \ 88 ${INSTALL} -c -o root -g wheel -m 644 master.sample \ 89 ${DESTDIR}/etc/amd) 90 (cd mtree; \ 91 ${INSTALL} -c -o root -g wheel -m 600 special \ 92 ${DESTDIR}/etc/mtree; \ 93 ${INSTALL} -c -o root -g wheel -m 444 4.4BSD.dist \ 94 ${DESTDIR}/etc/mtree) 95 (cd photuris; \ 96 ${INSTALL} -c -o root -g wheel -m 600 secrets.conf \ 97 ${DESTDIR}/etc/photuris; \ 98 ${INSTALL} -c -o root -g wheel -m 600 attributes.conf \ 99 ${DESTDIR}/etc/photuris; \ 100 ${INSTALL} -c -o root -g wheel -m 600 photuris.conf \ 101 ${DESTDIR}/etc/photuris; \ 102 ${INSTALL} -c -o root -g wheel -m 600 photuris.startup \ 103 ${DESTDIR}/etc/photuris) 104 (cd ppp; \ 105 ${INSTALL} -c -o root -g wheel -m 600 chap-secrets \ 106 ${DESTDIR}/etc/ppp; \ 107 ${INSTALL} -c -o root -g wheel -m 600 options \ 108 ${DESTDIR}/etc/ppp; \ 109 ${INSTALL} -c -o root -g wheel -m 600 options.leaf \ 110 ${DESTDIR}/etc/ppp; \ 111 ${INSTALL} -c -o root -g wheel -m 600 options.sample \ 112 ${DESTDIR}/etc/ppp; \ 113 ${INSTALL} -c -o root -g wheel -m 600 chatscript.sample \ 114 ${DESTDIR}/etc/ppp; \ 115 ${INSTALL} -c -o root -g wheel -m 600 pap-secrets \ 116 ${DESTDIR}/etc/ppp) 117 cd namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \ 118 ${DESTDIR}/etc/namedb 119 /bin/rm -f ${DESTDIR}/etc/localtime 120 ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime 121 /bin/rm -f ${DESTDIR}/etc/rmt 122 ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt 123 ${INSTALL} -c -o root -g wheel -m 644 minfree \ 124 ${DESTDIR}/var/crash 125 ${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \ 126 ${DESTDIR}/etc/dumpdates 127 ${INSTALL} -c -o ${BINOWN} -g operator -m 644 /dev/null \ 128 ${DESTDIR}/etc/skeykeys 129 ${INSTALL} -c -o root -g wheel -m 600 /dev/null \ 130 ${DESTDIR}/var/at/at.deny 131 ${INSTALL} -c -o root -g wheel -m 600 /dev/null \ 132 ${DESTDIR}/var/cron/log 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/authlog 137 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 138 ${DESTDIR}/var/log/daemon 139 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 140 ${DESTDIR}/var/log/ftpd 141 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 142 ${DESTDIR}/var/log/ipflog 143 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 144 ${DESTDIR}/var/log/lastlog 145 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 146 ${DESTDIR}/var/log/lpd-errs 147 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 148 ${DESTDIR}/var/log/maillog 149 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 150 ${DESTDIR}/var/log/messages 151 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 152 ${DESTDIR}/var/log/secure 153 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 154 ${DESTDIR}/var/log/wtmp 155 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 156 ${DESTDIR}/var/log/xferlog 157 ${INSTALL} -c -o daemon -g staff -m 664 /dev/null \ 158 ${DESTDIR}/var/msgs/bounds 159 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 160 ${DESTDIR}/var/run/utmp 161.if (${MACHINE_ARCH} == "mips") 162 (cd etc.${MACHINE}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ 163 ld.so.conf ${DESTDIR}/etc) 164.endif 165 (cd ${DESTDIR}/dev; ./MAKEDEV all) 166.if ${MACHINE} == "vax" 167 (cd etc.vax; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \ 168 ${DESTDIR}/) 169.endif 170 (cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution) 171 (cd ../usr.sbin/ypserv/ypinit; ${MAKE} distribution) 172 (cd ../usr.bin/mail; ${MAKE} distribution) 173 174distribution: distribution-etc-root-var 175 (cd ..; ${MAKE} install) 176 177distrib-dirs: 178 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR} 179 -mtree -def mtree/4.4BSD.dist -p ${DESTDIR}/ -u 180 if [ ! -d ${DESTDIR}/usr/src ]; then \ 181 ${INSTALL} -d -o root -g wsrc -m 775 ${DESTDIR}/usr/src; \ 182 fi 183 cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys 184 185.ifndef RELEASEDIR 186release: 187 @echo setenv RELEASEDIR before building a release. 188 @false 189.else 190release: distribution snap_pre snap_md 191 cd ${.CURDIR}/../distrib/notes; ${MAKE}; ${MAKE} install 192 cd ${.CURDIR}/../distrib/sets; csh maketars 193 -cp ${DESTDIR}/snapshot/bsd* ${RELEASEDIR} 194 -cp ${DESTDIR}/snapshot/*boot* ${RELEASEDIR} 195 -cp ${DESTDIR}/snapshot/INSTALL.* ${RELEASEDIR} 196 -cp ${DESTDIR}/snapshot/*.fs ${DESTDIR}/snapshot/*.fs.gz ${RELEASEDIR} 197 -cd ${RELEASEDIR}; md5 bsd* *boot* INSTALL.* *.fs *.gz > MD5 198 -cd ${RELEASEDIR}; cksum bsd* *boot* INSTALL.* *.fs *.gz > CKSUM 199.endif 200 201snapshot: distribution snap_pre snap_tar snap_md 202 cd ${DESTDIR}/snapshot && cksum * > CKSUMS 203 cd ${DESTDIR}/snapshot && md5 * > MD5 204 205snap_pre: 206 /bin/rm -rf ${DESTDIR}/snapshot 207 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/snapshot 208 209snap_tar: 210 cd ${DESTDIR} && tar cf - bin \ 211 | ${GZIP} ${GZIPFLAGS} > snapshot/bin.tar${GZIPEXT} 212 cd ${DESTDIR} && tar cf - dev \ 213 | ${GZIP} ${GZIPFLAGS} > snapshot/dev.tar${GZIPEXT} 214 cd ${DESTDIR} && tar cf - .profile .cshrc altroot etc home mnt \ 215 root stand sys tmp | ${GZIP} ${GZIPFLAGS} \ 216 > snapshot/etc.tar${GZIPEXT} 217 cd ${DESTDIR} && tar cf - sbin \ 218 | ${GZIP} ${GZIPFLAGS} > snapshot/sbin.tar${GZIPEXT} 219 cd ${DESTDIR} && tar cf - usr/bin \ 220 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.bin.tar${GZIPEXT} 221 cd ${DESTDIR} && tar cf - usr/games \ 222 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.games.tar${GZIPEXT} 223 cd ${DESTDIR} && tar cf - usr/include \ 224 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.include.tar${GZIPEXT} 225 cd ${DESTDIR} && tar cf - usr/lib \ 226 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.lib.tar${GZIPEXT} 227 cd ${DESTDIR} && tar cf - usr/libexec \ 228 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.libexec.tar${GZIPEXT} 229 cd ${DESTDIR} && tar cf - usr/mdec usr/libdata usr/lkm usr/local \ 230 usr/src usr/obj | ${GZIP} ${GZIPFLAGS} \ 231 > snapshot/usr.misc.tar${GZIPEXT} 232 cd ${DESTDIR} && tar cf - usr/sbin \ 233 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.sbin.tar${GZIPEXT} 234 cd ${DESTDIR} && tar cf - usr/share \ 235 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.share.tar${GZIPEXT} 236 cd ${DESTDIR} && tar cf - var \ 237 | ${GZIP} ${GZIPFLAGS} > snapshot/var.tar${GZIPEXT} 238 cd ../distrib/notes; ${MAKE}; ${MAKE} install 239 240snap_md: 241# nothing here -- look in the machine-dependent Makefile.inc 242 243.endif # DESTDIR check 244 245.include <bsd.prog.mk> 246