Annotation of src/etc/Makefile, Revision 1.395
1.395 ! matthieu 1: # $OpenBSD: Makefile,v 1.394 2014/09/15 20:26:32 rpe Exp $
1.1 deraadt 2:
3: TZDIR= /usr/share/zoneinfo
1.182 deraadt 4: LOCALTIME= Canada/Mountain
1.287 espie 5: MTREEDIR= /etc/mtree
1.1 deraadt 6:
1.268 todd 7: NOOBJ=
1.1 deraadt 8:
1.309 espie 9: KERNELS = GENERIC bsd
10:
1.1 deraadt 11: .if exists(etc.${MACHINE}/Makefile.inc)
12: .include "etc.${MACHINE}/Makefile.inc"
13: .endif
14:
1.309 espie 15: .for CONF K in ${KERNELS}
16: . if !target($K)
17: $K:
18: cd ../sys/arch/${MACHINE}/conf && config ${CONF}
19: cd ../sys/arch/${MACHINE}/compile/${CONF} && \
20: ${MAKE} clean && exec ${MAKE}
21: . endif
22: ALL_KERNELS += $K
23: .endfor
24:
25: kernels: bootblocks ${ALL_KERNELS}
26: .for CONF K in ${KERNELS}
27: cp ../sys/arch/${MACHINE}/compile/${CONF}/bsd ${RELEASEDIR}/$K
28: .endfor
1.337 deraadt 29:
1.1 deraadt 30: # -rw-r--r--
31: BINOWN= root
32: BINGRP= wheel
1.392 ajacouto 33: MUTABLE=changelist csh.cshrc csh.login csh.logout daily \
1.381 deraadt 34: etc.${MACHINE}/disktab etc.${MACHINE}/login.conf ftpusers \
1.393 ajacouto 35: gettytab group ksh.kshrc locate.rc mailer.conf man.conf \
36: moduli monthly netstart networks newsyslog.conf \
1.381 deraadt 37: pf.os protocols rc rc.conf rpc services shells syslog.conf weekly
38:
39: # -rw-r--r--
1.392 ajacouto 40: EXAMPLES=chio.conf dhclient.conf dhcpd.conf exports ftpchroot hosts.lpd \
41: httpd.conf ifstated.conf inetd.conf mixerctl.conf mrouted.conf \
42: ntpd.conf printcap rbootd.conf remote sensorsd.conf
1.371 deraadt 43: .if ${MACHINE} != "aviion"
1.381 deraadt 44: EXAMPLES+= wsconsctl.conf
1.371 deraadt 45: .endif
1.362 deraadt 46:
1.381 deraadt 47: # -rw-------
1.388 reyk 48: EXAMPLES_600=bgpd.conf dvmrpd.conf hostapd.conf iked.conf ipsec.conf \
49: ldapd.conf ldpd.conf ospf6d.conf ospfd.conf pf.conf rc.local \
50: rc.securelevel rc.shutdown relayd.conf ripd.conf \
51: sasyncd.conf snmpd.conf ypldap.conf
1.1 deraadt 52:
1.297 robert 53: # -r-xr-xr-x
1.316 deraadt 54: RCDAEMONS= amd apmd bgpd bootparamd cron dhcpd dhcrelay dvmrpd \
1.386 reyk 55: ftpd ftpproxy hostapd hotplugd httpd identd ifstated iked \
1.324 yasuoka 56: inetd isakmpd ldapd npppd ldattach ldpd lpd mopd mrouted \
1.390 robert 57: nsd ntpd ospfd ospf6d portmap pflogd rarpd rbootd \
1.395 ! matthieu 58: relayd ripd route6d rtadvd rtsold sasyncd \
1.332 naddy 59: sensorsd slowcgi smtpd snmpd spamd sshd syslogd watchdogd \
1.355 ajacouto 60: wsmoused xdm ypbind ypldap yppasswdd ypserv nfsd mountd lockd \
1.367 claudio 61: statd spamlogd sndiod tftpd tftpproxy ldomd unbound iscsid
1.297 robert 62:
1.391 rpe 63: MISETS= base${OSrev}.tgz comp${OSrev}.tgz man${OSrev}.tgz game${OSrev}.tgz
1.37 niklas 64:
1.1 deraadt 65: all clean cleandir depend etc install lint:
66:
1.287 espie 67: install-mtree:
1.317 espie 68: ${INSTALL} -c -o root -g wheel -m 600 mtree/special \
1.287 espie 69: ${DESTDIR}${MTREEDIR}
1.317 espie 70: ${INSTALL} -c -o root -g wheel -m 444 mtree/4.4BSD.dist \
1.287 espie 71: ${DESTDIR}${MTREEDIR}
1.317 espie 72: ${INSTALL} -c -o root -g wheel -m 444 mtree/BSD.x11.dist \
1.287 espie 73: ${DESTDIR}${MTREEDIR}
74:
1.1 deraadt 75: .ifndef DESTDIR
1.238 deraadt 76: distribution-etc-root-var distribution distrib-dirs release:
1.1 deraadt 77: @echo setenv DESTDIR before doing that!
78: @false
79: .else
1.143 todd 80: distribution-etc-root-var: distrib-dirs
1.380 deraadt 81: ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${MUTABLE} ${DESTDIR}/etc
1.382 okan 82: sh ttys.pty | cat etc.${MACHINE}/ttys - > ${DESTDIR}/etc/ttys && \
1.18 deraadt 83: chown ${BINOWN} ${DESTDIR}/etc/ttys && \
1.20 millert 84: chgrp ${BINGRP} ${DESTDIR}/etc/ttys && \
1.86 deraadt 85: chmod 644 ${DESTDIR}/etc/ttys
1.374 deraadt 86: cat examples/sysctl.conf etc.${MACHINE}/sysctl.conf > \
1.373 deraadt 87: ${DESTDIR}/etc/examples/sysctl.conf && \
88: chown ${BINOWN} ${DESTDIR}/etc/examples/sysctl.conf && \
89: chgrp ${BINGRP} ${DESTDIR}/etc/examples/sysctl.conf && \
90: chmod 644 ${DESTDIR}/etc/examples/sysctl.conf
1.19 deraadt 91: cat fbtab.head etc.${MACHINE}/fbtab fbtab.tail > ${DESTDIR}/etc/fbtab && \
92: chown ${BINOWN} ${DESTDIR}/etc/fbtab && \
1.20 millert 93: chgrp ${BINGRP} ${DESTDIR}/etc/fbtab && \
1.19 deraadt 94: chmod 644 ${DESTDIR}/etc/fbtab
1.378 deraadt 95: ${INSTALL} -c -o ${BINOWN} -g operator -m 664 motd ${DESTDIR}/etc
1.278 ajacouto 96: ${INSTALL} -c -o root -g crontab -m 600 crontab ${DESTDIR}/var/cron/tabs/root
1.37 niklas 97: ${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
1.14 mickey 98: pwd_mkdb -p -d ${DESTDIR}/etc /etc/master.passwd
1.176 henning 99: ${INSTALL} -c -o root -g wheel -m 600 pf.conf ${DESTDIR}/etc
1.361 deraadt 100: ${INSTALL} -c -o root -g _nsd -m 640 nsd.conf ${DESTDIR}/var/nsd/etc
1.347 sthen 101: ${INSTALL} -c -o root -g wheel -m 644 unbound.conf ${DESTDIR}/var/unbound/etc
1.164 deraadt 102: ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
103: etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
1.159 espie 104: cd root; \
1.37 niklas 105: ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
1.1 deraadt 106: ${DESTDIR}/root/.cshrc; \
1.37 niklas 107: ${INSTALL} -c -o root -g wheel -m 644 dot.login \
1.1 deraadt 108: ${DESTDIR}/root/.login; \
1.37 niklas 109: ${INSTALL} -c -o root -g wheel -m 644 dot.profile \
1.1 deraadt 110: ${DESTDIR}/root/.profile; \
1.274 deraadt 111: ${INSTALL} -c -o root -g wheel -m 644 dot.Xdefaults \
112: ${DESTDIR}/root/.Xdefaults; \
1.331 espie 113: ${INSTALL} -c -o root -g wheel -m 644 dot.cvsrc \
114: ${DESTDIR}/root/.cvsrc; \
1.1 deraadt 115: rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
1.229 beck 116: ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
117: ${DESTDIR}/.cshrc; \
118: ${INSTALL} -c -o root -g wheel -m 644 dot.profile \
1.261 sobrado 119: ${DESTDIR}/.profile
1.159 espie 120: cd skel; \
1.109 jakob 121: ${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
122: ${DESTDIR}/etc/skel/.cshrc; \
123: ${INSTALL} -c -o root -g wheel -m 644 dot.login \
124: ${DESTDIR}/etc/skel/.login; \
125: ${INSTALL} -c -o root -g wheel -m 644 dot.mailrc \
126: ${DESTDIR}/etc/skel/.mailrc; \
127: ${INSTALL} -c -o root -g wheel -m 644 dot.profile \
1.260 mcbride 128: ${DESTDIR}/etc/skel/.profile; \
1.274 deraadt 129: ${INSTALL} -c -o root -g wheel -m 644 dot.Xdefaults \
130: ${DESTDIR}/etc/skel/.Xdefaults; \
1.331 espie 131: ${INSTALL} -c -o root -g wheel -m 644 dot.cvsrc \
132: ${DESTDIR}/etc/skel/.cvsrc; \
1.260 mcbride 133: ${INSTALL} -c -o root -g wheel -m 600 /dev/null \
134: ${DESTDIR}/etc/skel/.ssh/authorized_keys
1.159 espie 135: cd amd; \
1.37 niklas 136: ${INSTALL} -c -o root -g wheel -m 644 master.sample \
1.159 espie 137: ${DESTDIR}/etc/amd
138: cd ppp; \
1.37 niklas 139: ${INSTALL} -c -o root -g wheel -m 600 chap-secrets \
1.6 deraadt 140: ${DESTDIR}/etc/ppp; \
1.37 niklas 141: ${INSTALL} -c -o root -g wheel -m 600 options \
1.6 deraadt 142: ${DESTDIR}/etc/ppp; \
1.37 niklas 143: ${INSTALL} -c -o root -g wheel -m 600 options.sample \
1.32 deraadt 144: ${DESTDIR}/etc/ppp; \
1.37 niklas 145: ${INSTALL} -c -o root -g wheel -m 600 chatscript.sample \
1.32 deraadt 146: ${DESTDIR}/etc/ppp; \
1.37 niklas 147: ${INSTALL} -c -o root -g wheel -m 600 pap-secrets \
1.159 espie 148: ${DESTDIR}/etc/ppp
1.358 deraadt 149: cd examples; \
150: ${INSTALL} -c -o root -g wheel -m 644 ${EXAMPLES} \
1.368 ajacouto 151: ${DESTDIR}/etc/examples; \
152: ${INSTALL} -c -o root -g wheel -m 600 ${EXAMPLES_600} \
1.394 rpe 153: ${DESTDIR}/etc/examples; \
154: chgrp operator ${DESTDIR}/etc/examples/chio.conf
1.340 deraadt 155: cd signify; \
156: ${INSTALL} -c -o root -g wheel -m 644 *.pub \
157: ${DESTDIR}/etc/signify
1.168 provos 158: cd systrace; \
1.169 provos 159: ${INSTALL} -c -o root -g wheel -m 600 usr_sbin_lpd \
160: ${DESTDIR}/etc/systrace; \
1.383 okan 161: ln -fs ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
162: ln -fs /usr/sbin/rmt ${DESTDIR}/etc/rmt
1.37 niklas 163: ${INSTALL} -c -o root -g wheel -m 644 minfree \
1.264 sobrado 164: ${DESTDIR}/var/crash
1.37 niklas 165: ${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
1.264 sobrado 166: ${DESTDIR}/etc/dumpdates
1.158 millert 167: ${INSTALL} -c -o root -g crontab -m 660 /dev/null \
1.264 sobrado 168: ${DESTDIR}/var/cron/at.deny
1.177 millert 169: ${INSTALL} -c -o root -g crontab -m 660 /dev/null \
1.264 sobrado 170: ${DESTDIR}/var/cron/cron.deny
1.37 niklas 171: ${INSTALL} -c -o root -g wheel -m 600 /dev/null \
1.264 sobrado 172: ${DESTDIR}/var/cron/log
1.104 millert 173: ${INSTALL} -c -o root -g wheel -m 444 /dev/null \
1.264 sobrado 174: ${DESTDIR}/var/db/locate.database
1.104 millert 175: ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
1.264 sobrado 176: ${DESTDIR}/var/log/authlog
1.104 millert 177: ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
1.264 sobrado 178: ${DESTDIR}/var/log/daemon
1.173 fgsch 179: ${INSTALL} -c -o ${BINOWN} -g wheel -m 600 /dev/null \
1.264 sobrado 180: ${DESTDIR}/var/log/failedlogin
1.104 millert 181: ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
1.264 sobrado 182: ${DESTDIR}/var/log/ftpd
1.104 millert 183: ${INSTALL} -c -o ${BINOWN} -g wheel -m 644 /dev/null \
1.264 sobrado 184: ${DESTDIR}/var/log/lastlog
1.104 millert 185: ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
1.264 sobrado 186: ${DESTDIR}/var/log/lpd-errs
1.104 millert 187: ${INSTALL} -c -o ${BINOWN} -g wheel -m 600 /dev/null \
1.264 sobrado 188: ${DESTDIR}/var/log/maillog
1.172 pvalchev 189: ${INSTALL} -c -o ${BINOWN} -g wheel -m 644 /dev/null \
1.264 sobrado 190: ${DESTDIR}/var/log/messages
1.104 millert 191: ${INSTALL} -c -o ${BINOWN} -g wheel -m 600 /dev/null \
1.264 sobrado 192: ${DESTDIR}/var/log/secure
1.104 millert 193: ${INSTALL} -c -o ${BINOWN} -g wheel -m 644 /dev/null \
1.264 sobrado 194: ${DESTDIR}/var/log/wtmp
1.104 millert 195: ${INSTALL} -c -o ${BINOWN} -g wheel -m 640 /dev/null \
1.264 sobrado 196: ${DESTDIR}/var/log/xferlog
1.159 espie 197: cd ../usr.sbin/ypserv/ypinit && exec ${MAKE} distribution
198: cd ../usr.bin/ssh && exec ${MAKE} distribution
1.352 miod 199: cd ../lib/libcrypto && exec ${MAKE} distribution
1.244 reyk 200: cd ../usr.bin/bgplg && exec ${MAKE} distribution
1.159 espie 201: cd ../usr.bin/mail && exec ${MAKE} distribution
1.385 deraadt 202: cd ../usr.sbin/sliplogin && exec ${MAKE} distribution
1.288 martinh 203: cd ../usr.sbin/ldapd && exec ${MAKE} distribution
1.324 yasuoka 204: cd ../usr.sbin/npppd && exec ${MAKE} distribution
1.185 millert 205: cd mail && exec ${MAKE} distribution
1.83 deraadt 206: ${INSTALL} -c -o root -g wheel -m 600 root/root.mail \
1.264 sobrado 207: ${DESTDIR}/var/mail/root
1.120 millert 208: ${INSTALL} -c -o root -g wheel -m 440 ../usr.bin/sudo/sudoers \
1.264 sobrado 209: ${DESTDIR}/etc/sudoers
1.294 robert 210: cd rc.d; \
211: ${INSTALL} -c -o root -g wheel -m 644 rc.subr \
1.297 robert 212: ${DESTDIR}/etc/rc.d && \
213: ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 ${RCDAEMONS} \
1.294 robert 214: ${DESTDIR}/etc/rc.d
1.375 ajacouto 215: touch ${DESTDIR}/usr/share/sysmerge/etcsum
216: touch ${DESTDIR}/usr/share/sysmerge/examplessum
1.365 ajacouto 217: ETCLIST=`mktemp /tmp/_etclist.XXXXXXXXXX` || exit 1; \
1.391 rpe 218: sort ${.CURDIR}/../distrib/sets/lists/etc/{mi,md.${MACHINE}} > $${ETCLIST}; \
1.283 ajacouto 219: cd ${DESTDIR} && \
1.375 ajacouto 220: xargs sha256 -h ${DESTDIR}/usr/share/sysmerge/etcsum < $${ETCLIST} || true; \
1.365 ajacouto 221: rm -f $${ETCLIST}
222: EGLIST=`mktemp /tmp/_eglist.XXXXXXXXXX` || exit 1; \
223: grep -h '/etc/examples/' ../distrib/sets/lists/base/{mi,md.${MACHINE}} | sort > $${EGLIST}; \
1.363 ajacouto 224: cd ${DESTDIR} && \
1.375 ajacouto 225: xargs sha256 -h ${DESTDIR}/usr/share/sysmerge/examplessum < $${EGLIST} || true; \
1.365 ajacouto 226: rm -f $${EGLIST}
1.391 rpe 227: cd ${DESTDIR} && \
228: sort ${.CURDIR}/../distrib/sets/lists/etc/{mi,md.${MACHINE}} | \
229: pax -w -d | gzip -9 > ${DESTDIR}/usr/share/sysmerge/etc.tgz
230:
231: distribution:
232: exec ${SUDO} ${MAKE} distribution-etc-root-var
233: cd .. && exec ${SUDO} ${MAKE} install
1.1 deraadt 234:
235: distrib-dirs:
1.151 deraadt 236: if [ ! -d ${DESTDIR}/. ]; then \
237: ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}; \
238: fi
1.152 millert 239: mtree -qdef mtree/4.4BSD.dist -p ${DESTDIR}/ -U
1.38 millert 240: if [ ! -d ${DESTDIR}/usr/src ]; then \
1.37 niklas 241: ${INSTALL} -d -o root -g wsrc -m 775 ${DESTDIR}/usr/src; \
1.16 deraadt 242: fi
1.383 okan 243: cd ${DESTDIR}/; ln -fhs usr/src/sys sys
1.49 deraadt 244:
245: .ifndef RELEASEDIR
246: release:
247: @echo setenv RELEASEDIR before building a release.
248: @false
249: .else
1.272 deraadt 250:
1.271 deraadt 251: release-sets:
1.343 deraadt 252: cd ${RELEASEDIR} && rm -f SHA256
1.317 espie 253: cd ../distrib/sets && exec ${SUDO} sh maketars ${OSrev}
1.271 deraadt 254:
1.272 deraadt 255: sha:
1.85 ryker 256: -cd ${RELEASEDIR}; \
1.350 sthen 257: cksum -a sha256 INSTALL.`arch -ks` \
1.344 deraadt 258: ${ALL_KERNELS} ${MDEXT} ${MISETS} | sort > SHA256
1.272 deraadt 259:
1.318 espie 260: release: sha
261: sha: distrib
262: distrib: release-sets kernels
1.328 phessler 263: release-sets: distribution kernels
1.35 graichen 264:
1.238 deraadt 265: .endif
1.1 deraadt 266:
267: .endif # DESTDIR check
1.136 todd 268:
1.160 espie 269: distrib:
1.317 espie 270: cd ../distrib && \
1.215 deraadt 271: ${MAKE} && exec ${SUDO} ${MAKE} install
1.1 deraadt 272:
1.159 espie 273: .PHONY: distribution-etc-root-var distribution distrib-dirs \
1.309 espie 274: release allarchs kernels release-sets m4 install-mtree \
275: bootblocks ${ALL_KERNELS}
1.266 todd 276:
1.349 miod 277: SUBDIR+= etc.alpha etc.amd64 etc.armish etc.armv7 etc.aviion
1.330 jasper 278: SUBDIR+= etc.hppa etc.hppa64 etc.i386 etc.landisk etc.loongson etc.luna88k
1.349 miod 279: SUBDIR+= etc.macppc etc.octeon
1.285 matthieu 280: SUBDIR+= etc.sgi etc.socppc etc.sparc etc.sparc64 etc.vax etc.zaurus
1.266 todd 281:
282: .include <bsd.subdir.mk>
1.1 deraadt 283: .include <bsd.prog.mk>