Makefile revision 1.70
1# $OpenBSD: Makefile,v 1.70 1997/09/24 02:05:17 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 cat etc.${MACHINE}/ttys ttys.pty > ${DESTDIR}/etc/ttys && \ 54 chown ${BINOWN} ${DESTDIR}/etc/ttys && \ 55 chgrp ${BINGRP} ${DESTDIR}/etc/ttys && \ 56 chmod 644 ${DESTDIR}/etc/ttys 57 cat fbtab.head etc.${MACHINE}/fbtab fbtab.tail > ${DESTDIR}/etc/fbtab && \ 58 chown ${BINOWN} ${DESTDIR}/etc/fbtab && \ 59 chgrp ${BINGRP} ${DESTDIR}/etc/fbtab && \ 60 chmod 644 ${DESTDIR}/etc/fbtab 61 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc 62 ${INSTALL} -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root 63 ${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc 64 pwd_mkdb -p -d ${DESTDIR}/etc /etc/master.passwd 65 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 66 MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev 67 (cd root; \ 68 ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \ 69 ${DESTDIR}/root/.cshrc; \ 70 ${INSTALL} -c -o root -g wheel -m 644 dot.klogin \ 71 ${DESTDIR}/root/.klogin; \ 72 ${INSTALL} -c -o root -g wheel -m 644 dot.login \ 73 ${DESTDIR}/root/.login; \ 74 ${INSTALL} -c -o root -g wheel -m 644 dot.profile \ 75 ${DESTDIR}/root/.profile; \ 76 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 77 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 78 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile) 79 (cd kerberosIV; \ 80 ${INSTALL} -c -o root -g wheel -m 644 README \ 81 ${DESTDIR}/etc/kerberosIV; \ 82 ${INSTALL} -c -o root -g wheel -m 644 krb.conf \ 83 ${DESTDIR}/etc/kerberosIV; \ 84 ${INSTALL} -c -o root -g wheel -m 444 krb.realms \ 85 ${DESTDIR}/etc/kerberosIV) 86 (cd amd; \ 87 ${INSTALL} -c -o root -g wheel -m 644 master.sample \ 88 ${DESTDIR}/etc/amd) 89 (cd mtree; \ 90 ${INSTALL} -c -o root -g wheel -m 600 special \ 91 ${DESTDIR}/etc/mtree; \ 92 ${INSTALL} -c -o root -g wheel -m 444 4.4BSD.dist \ 93 ${DESTDIR}/etc/mtree) 94 ${INSTALL} -c -o root -g wheel -m 444 BSD.local.dist \ 95 ${DESTDIR}/etc/mtree) 96 ${INSTALL} -c -o root -g wheel -m 444 BSD.x11.dist \ 97 ${DESTDIR}/etc/mtree) 98 (cd photuris; \ 99 ${INSTALL} -c -o root -g wheel -m 600 secrets.conf \ 100 ${DESTDIR}/etc/photuris; \ 101 ${INSTALL} -c -o root -g wheel -m 600 attributes.conf \ 102 ${DESTDIR}/etc/photuris; \ 103 ${INSTALL} -c -o root -g wheel -m 600 photuris.conf \ 104 ${DESTDIR}/etc/photuris; \ 105 ${INSTALL} -c -o root -g wheel -m 600 photuris.startup \ 106 ${DESTDIR}/etc/photuris) 107 (cd ppp; \ 108 ${INSTALL} -c -o root -g wheel -m 600 chap-secrets \ 109 ${DESTDIR}/etc/ppp; \ 110 ${INSTALL} -c -o root -g wheel -m 600 options \ 111 ${DESTDIR}/etc/ppp; \ 112 ${INSTALL} -c -o root -g wheel -m 600 options.leaf \ 113 ${DESTDIR}/etc/ppp; \ 114 ${INSTALL} -c -o root -g wheel -m 600 options.sample \ 115 ${DESTDIR}/etc/ppp; \ 116 ${INSTALL} -c -o root -g wheel -m 600 chatscript.sample \ 117 ${DESTDIR}/etc/ppp; \ 118 ${INSTALL} -c -o root -g wheel -m 600 pap-secrets \ 119 ${DESTDIR}/etc/ppp) 120 cd namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \ 121 ${DESTDIR}/etc/namedb 122 /bin/rm -f ${DESTDIR}/etc/localtime 123 ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime 124 /bin/rm -f ${DESTDIR}/etc/rmt 125 ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt 126 ${INSTALL} -c -o root -g wheel -m 644 minfree \ 127 ${DESTDIR}/var/crash 128 ${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \ 129 ${DESTDIR}/etc/dumpdates 130 ${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \ 131 ${DESTDIR}/etc/skeykeys 132 ${INSTALL} -c -o root -g wheel -m 600 /dev/null \ 133 ${DESTDIR}/var/at/at.deny 134 ${INSTALL} -c -o root -g wheel -m 600 /dev/null \ 135 ${DESTDIR}/var/cron/log 136 ${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \ 137 ${DESTDIR}/var/db/locate.database 138 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 139 ${DESTDIR}/var/log/authlog 140 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 141 ${DESTDIR}/var/log/daemon 142 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 143 ${DESTDIR}/var/log/ftpd 144 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 145 ${DESTDIR}/var/log/ipflog 146 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 147 ${DESTDIR}/var/log/lastlog 148 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 149 ${DESTDIR}/var/log/lpd-errs 150 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 151 ${DESTDIR}/var/log/maillog 152 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 153 ${DESTDIR}/var/log/messages 154 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 155 ${DESTDIR}/var/log/secure 156 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 157 ${DESTDIR}/var/log/wtmp 158 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 159 ${DESTDIR}/var/log/xferlog 160 ${INSTALL} -c -o daemon -g staff -m 664 /dev/null \ 161 ${DESTDIR}/var/msgs/bounds 162 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 163 ${DESTDIR}/var/run/utmp 164.if (${MACHINE_ARCH} == "mips") 165 (cd etc.${MACHINE}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ 166 ld.so.conf ${DESTDIR}/etc) 167.endif 168 (cd ${DESTDIR}/dev; ./MAKEDEV all) 169.if ${MACHINE} == "vax" 170 (cd etc.vax; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \ 171 ${DESTDIR}/) 172.endif 173 (cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution) 174 (cd ../usr.sbin/ypserv/ypinit; ${MAKE} distribution) 175 (cd ../usr.bin/mail; ${MAKE} distribution) 176 /usr/sbin/sendmail -C${DESTDIR}/etc/sendmail.cf -bi -O AliasFile=${DESTDIR}/etc/aliases 177 178distribution: distribution-etc-root-var 179 (cd ..; ${MAKE} install) 180 181distrib-dirs: 182 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR} 183 -mtree -def mtree/4.4BSD.dist -p ${DESTDIR}/ -u 184 if [ ! -d ${DESTDIR}/usr/src ]; then \ 185 ${INSTALL} -d -o root -g wsrc -m 775 ${DESTDIR}/usr/src; \ 186 fi 187 cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys 188 189.ifndef RELEASEDIR 190release: 191 @echo setenv RELEASEDIR before building a release. 192 @false 193.else 194release: distribution snap_pre snap_md 195 cd ${.CURDIR}/../distrib/notes; ${MAKE}; ${MAKE} install 196 cd ${.CURDIR}/../distrib/sets; csh maketars 197 -cp ${DESTDIR}/snapshot/bsd* ${RELEASEDIR} 198 -cp ${DESTDIR}/snapshot/*boot* ${RELEASEDIR} 199 -cp ${DESTDIR}/snapshot/INSTALL.* ${RELEASEDIR} 200 -cp ${DESTDIR}/snapshot/*.fs ${DESTDIR}/snapshot/*.fs.gz ${RELEASEDIR} 201 -cd ${RELEASEDIR}; md5 bsd* *boot* INSTALL.* *.fs *.gz > MD5 202 -cd ${RELEASEDIR}; cksum bsd* *boot* INSTALL.* *.fs *.gz > CKSUM 203.endif 204 205snapshot: distribution snap_pre snap_tar snap_md 206 cd ${DESTDIR}/snapshot && cksum * > CKSUMS 207 cd ${DESTDIR}/snapshot && md5 * > MD5 208 209snap_pre: 210 /bin/rm -rf ${DESTDIR}/snapshot 211 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/snapshot 212 213snap_tar: 214 cd ${DESTDIR} && tar cf - bin \ 215 | ${GZIP} ${GZIPFLAGS} > snapshot/bin.tar${GZIPEXT} 216 cd ${DESTDIR} && tar cf - dev \ 217 | ${GZIP} ${GZIPFLAGS} > snapshot/dev.tar${GZIPEXT} 218 cd ${DESTDIR} && tar cf - .profile .cshrc altroot etc home mnt \ 219 root stand sys tmp | ${GZIP} ${GZIPFLAGS} \ 220 > snapshot/etc.tar${GZIPEXT} 221 cd ${DESTDIR} && tar cf - sbin \ 222 | ${GZIP} ${GZIPFLAGS} > snapshot/sbin.tar${GZIPEXT} 223 cd ${DESTDIR} && tar cf - usr/bin \ 224 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.bin.tar${GZIPEXT} 225 cd ${DESTDIR} && tar cf - usr/games \ 226 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.games.tar${GZIPEXT} 227 cd ${DESTDIR} && tar cf - usr/include \ 228 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.include.tar${GZIPEXT} 229 cd ${DESTDIR} && tar cf - usr/lib \ 230 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.lib.tar${GZIPEXT} 231 cd ${DESTDIR} && tar cf - usr/libexec \ 232 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.libexec.tar${GZIPEXT} 233 cd ${DESTDIR} && tar cf - usr/mdec usr/libdata usr/lkm usr/local \ 234 usr/src usr/obj | ${GZIP} ${GZIPFLAGS} \ 235 > snapshot/usr.misc.tar${GZIPEXT} 236 cd ${DESTDIR} && tar cf - usr/sbin \ 237 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.sbin.tar${GZIPEXT} 238 cd ${DESTDIR} && tar cf - usr/share \ 239 | ${GZIP} ${GZIPFLAGS} > snapshot/usr.share.tar${GZIPEXT} 240 cd ${DESTDIR} && tar cf - var \ 241 | ${GZIP} ${GZIPFLAGS} > snapshot/var.tar${GZIPEXT} 242 cd ../distrib/notes; ${MAKE}; ${MAKE} install 243 244snap_md: 245# nothing here -- look in the machine-dependent Makefile.inc 246 247.endif # DESTDIR check 248 249.include <bsd.prog.mk> 250