Makefile revision 218941
11195Srgrimes# from: @(#)Makefile 5.11 (Berkeley) 5/21/91 250472Speter# $FreeBSD: head/etc/Makefile 218941 2011-02-22 08:13:49Z uqs $ 337Srgrimes 4156813Sru.include <bsd.own.mk> 5156813Sru 6156813Sru.if ${MK_SENDMAIL} != "no" 738103SpeterSUBDIR= sendmail 873251Sgshapiro.endif 938103Speter 10183242SsamBIN1= auth.conf \ 11184343Ssam crontab devd.conf devfs.conf \ 12183242Ssam ddb.conf dhclient.conf disktab fbtab \ 13161748Scperciva ftpusers gettytab group \ 14183242Ssam hosts hosts.allow hosts.equiv \ 15162674Spiso inetd.conf libalias.conf login.access login.conf mac.conf motd \ 16158266Sume netconfig network.subr networks newsyslog.conf nsswitch.conf \ 17183242Ssam phones profile protocols \ 18200028Sume rc rc.bsdextended rc.firewall rc.initdiskless \ 19145693Sbrooks rc.sendmail rc.shutdown \ 20183242Ssam rc.subr remote rpc services shells \ 21204820Sed sysctl.conf syslog.conf termcap.small 22155210Srwatson 23199249Sed.if exists(${.CURDIR}/etc.${MACHINE}/ttys) 24199249SedBIN1+= etc.${MACHINE}/ttys 25209134Simp.elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys) 26209134SimpBIN1+= etc.${MACHINE_ARCH}/ttys 27209134Simp.elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys) 28209134SimpBIN1+= etc.${MACHINE_CPUARCH}/ttys 29199249Sed.else 30209134Simp.error etc.MACHINE/ttys missing 31199249Sed.endif 32199249Sed 33155210SrwatsonOPENBSMDIR= ${.CURDIR}/../contrib/openbsm 34155210SrwatsonBSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \ 35155210Srwatson ${OPENBSMDIR}/etc/audit_event 36155210SrwatsonBSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \ 37155210Srwatson ${OPENBSMDIR}/etc/audit_user 38155210SrwatsonBSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn 39155210SrwatsonBSM_ETC_DIR= ${DESTDIR}/etc/security 40155210Srwatson 41183242Ssam# NB: keep these sorted by MK_* knobs 42183242Ssam 43183242Ssam.if ${MK_AMD} != "no" 44183242SsamBIN1+= amd.map 45183242Ssam.endif 46183242Ssam 47183242Ssam.if ${MK_APM} != "no" 48183242SsamBIN1+= apmd.conf 49183242Ssam.endif 50183242Ssam 51183242Ssam.if ${MK_BSNMP} != "no" 52183242SsamBIN1+= snmpd.config 53183242Ssam.endif 54183242Ssam 55183242Ssam.if ${MK_FREEBSD_UPDATE} != "no" 56183242SsamBIN1+= freebsd-update.conf 57183242Ssam.endif 58183242Ssam 59183242Ssam.if ${MK_LOCATE} != "no" 60183242SsamBIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc 61183242Ssam.endif 62183242Ssam 63156813Sru.if ${MK_LPR} != "no" 64183242SsamBIN1+= hosts.lpd printcap 65121911Smarkm.endif 6637Srgrimes 67183242Ssam.if ${MK_MAIL} != "no" 68183242SsamBIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc 69158115Sume.endif 70158115Sume 71193635Sedwin.if ${MK_NTP} != "no" 72193635SedwinBIN1+= ntp.conf 73193635Sedwin.endif 74193635Sedwin 75156813Sru.if ${MK_OPENSSH} != "no" 7657488SpeterSSH= ${.CURDIR}/../crypto/openssh/ssh_config \ 7774837Sgreen ${.CURDIR}/../crypto/openssh/sshd_config \ 78124214Sdes ${.CURDIR}/../crypto/openssh/moduli 7957459Smarkm.endif 80156813Sru.if ${MK_OPENSSL} != "no" 8160677SkrisSSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf 8260677Skris.endif 8360677Skris 84183242Ssam.if ${MK_NS_CACHING} != "no" 85183242SsamBIN1+= nscd.conf 86183242Ssam.endif 87183242Ssam 88183242Ssam.if ${MK_PORTSNAP} != "no" 89183242SsamBIN1+= portsnap.conf 90183242Ssam.endif 91183242Ssam 92183242Ssam.if ${MK_PF} != "no" 93183242SsamBIN1+= pf.os 94183242Ssam.endif 95183242Ssam 96184343Ssam.if ${MK_TCSH} != "no" 97184343SsamBIN1+= csh.cshrc csh.login csh.logout 98184343Ssam.endif 99184343Ssam 100183268Ssam.if ${MK_WIRELESS} != "no" 101183268SsamBIN1+= regdomain.xml 102183268Ssam.endif 103183268Ssam 10482521Salex# -rwxr-xr-x root:wheel, for the new cron root:wheel 105108002SgreenBIN2= netstart pccard_ether rc.suspend rc.resume 106147Srgrimes 107196767SflzMTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist 108156813Sru.if ${MK_SENDMAIL} != "no" 10995144SgshapiroMTREE+= BSD.sendmail.dist 11095144Sgshapiro.endif 111156813Sru.if ${MK_BIND} != "no" 112135851SdougbMTREE+= BIND.chroot.dist 113156813Sru.if ${MK_BIND_LIBS} != "no" 114135851SdougbMTREE+= BIND.include.dist 115135851Sdougb.endif 116135851Sdougb.endif 11799451Sru 11899451SruPPPCNF= ppp.conf 11999451Sru 120156813Sru.if ${MK_SENDMAIL} == "no" 121117292SgshapiroETCMAIL=mailer.conf aliases 122117292Sgshapiro.else 12364598SgshapiroETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ 12464598Sgshapiro mailertable.sample aliases 125117292Sgshapiro.endif 12637Srgrimes 127263Srgrimes# Special top level files for FreeBSD 12899449SruFREEBSD=COPYRIGHT 129263Srgrimes 130124831Sruafterinstall: 131156813Sru.if ${MK_MAN} != "no" 132173135Syar ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb 133124831Sru.endif 134124831Sru 1354487Sphkdistribute: 136173135Syar ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} 137173135Syar ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} 1385948Sjkh 139142794Sru.include <bsd.endian.mk> 140142794Sru.if ${TARGET_ENDIANNESS} == "1234" 141152471SruCAP_MKDB_ENDIAN?= -l 142152471SruPWD_MKDB_ENDIAN?= -L 143142794Sru.elif ${TARGET_ENDIANNESS} == "4321" 144152471SruCAP_MKDB_ENDIAN?= -b 145152471SruPWD_MKDB_ENDIAN?= -B 146142794Sru.else 147149515SimpCAP_MKDB_ENDIAN?= 148149515SimpPWD_MKDB_ENDIAN?= 149142794Sru.endif 150142794Sru 1514487Sphkdistribution: 152148282Sru.if !defined(DESTDIR) 153148282Sru @echo "set DESTDIR before running \"make ${.TARGET}\"" 154148282Sru @false 155148282Sru.endif 15699449Sru cd ${.CURDIR}; \ 157100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 15899451Sru ${BIN1} ${DESTDIR}/etc; \ 159142794Sru cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ 160100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ 16199451Sru ${BIN2} ${DESTDIR}/etc; \ 162100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 163184343Ssam master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; 164205329Sed.if ${MK_AT} == "no" 165205335Sed sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab 166205329Sed.endif 167184343Ssam.if ${MK_TCSH} == "no" 168184443Smp sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd 169184343Ssam.endif 170184343Ssam pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ 171184343Ssam ${DESTDIR}/etc/master.passwd 172183242Ssam.if ${MK_BLUETOOTH} != "no" 173173135Syar ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install 174183242Ssam.endif 175173135Syar ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install 176186249Sthompsa ${_+_}cd ${.CURDIR}/devd; ${MAKE} install 177173135Syar ${_+_}cd ${.CURDIR}/gss; ${MAKE} install 178173135Syar ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install 179173135Syar ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install 180173135Syar ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall 181173135Syar ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap 182173135Syar ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt 183173135Syar ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install 184155210Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ 185155210Srwatson ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} 186155571Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \ 187155210Srwatson ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR} 188155210Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ 189155210Srwatson ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} 190170913Sdougb.if ${MK_BIND_MTREE} != "no" 191170913Sdougb @if [ ! -e ${DESTDIR}/etc/namedb ]; then \ 192170913Sdougb set -x; \ 193170913Sdougb ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ 194170913Sdougb fi 195170913Sdougb.endif 196170913Sdougb.if ${MK_BIND_ETC} != "no" 197173135Syar ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install 198170913Sdougb.endif 199156813Sru.if ${MK_SENDMAIL} != "no" 200173135Syar ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution 20173251Sgshapiro.endif 202156813Sru.if ${MK_OPENSSH} != "no" 203100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 20499451Sru ${SSH} ${DESTDIR}/etc/ssh 20557488Speter.endif 206156813Sru.if ${MK_OPENSSL} != "no" 207100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 20899451Sru ${SSL} ${DESTDIR}/etc/ssl 20960677Skris.endif 210156813Sru.if ${MK_KERBEROS} != "no" 21199449Sru cd ${.CURDIR}/root; \ 212100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 213120709Sphk dot.k5login ${DESTDIR}/root/.k5login; 214120709Sphk.endif 215120709Sphk cd ${.CURDIR}/root; \ 216120709Sphk ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 217184343Ssam dot.profile ${DESTDIR}/root/.profile; \ 218184343Ssam rm -f ${DESTDIR}/.profile; \ 219184343Ssam ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile 220184343Ssam.if ${MK_TCSH} != "no" 221184343Ssam cd ${.CURDIR}/root; \ 222184343Ssam ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 22399451Sru dot.cshrc ${DESTDIR}/root/.cshrc; \ 224100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 22599451Sru dot.login ${DESTDIR}/root/.login; \ 226184343Ssam rm -f ${DESTDIR}/.cshrc; \ 227184343Ssam ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc 228184343Ssam.endif 229100872Sru cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 2301731Sjkh ${MTREE} ${DESTDIR}/etc/mtree 231183242Ssam.if ${MK_PPP} != "no" 232119058Sobrien cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 2336177Samurai ${PPPCNF} ${DESTDIR}/etc/ppp 234183242Ssam.endif 235183242Ssam.if ${MK_MAIL} != "no" 236100872Sru cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 23764598Sgshapiro ${ETCMAIL} ${DESTDIR}/etc/mail 23864629Sgshapiro @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ 23964629Sgshapiro ! -f ${DESTDIR}/etc/aliases ]; then \ 24064629Sgshapiro set -x; \ 24164629Sgshapiro ln -s mail/aliases ${DESTDIR}/etc/aliases; \ 24264629Sgshapiro fi 243183242Ssam.endif 244100872Sru ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ 24537Srgrimes ${DESTDIR}/etc/dumpdates 246100872Sru ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ 247147Srgrimes ${DESTDIR}/var/db/locate.database 248100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ 2491759Sjkh ${DESTDIR}/var/crash 250100872Sru cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 25199451Sru ${FREEBSD} ${DESTDIR}/ 252209228Savg.if ${MK_BOOT} != "no" 253171427Simp.if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints) 254126977Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 255126977Sru ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ 256126977Sru ${DESTDIR}/boot/device.hints 257171427Simp.endif 258209228Savg.endif 25937Srgrimes 260147Srgrimesdistrib-dirs: 261127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ 262127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var 263127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr 264127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ 2657129Srgrimes -p ${DESTDIR}/usr/include 266156813Sru.if ${MK_BIND_LIBS} != "no" 267135875Sdougb mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ 268135875Sdougb -p ${DESTDIR}/usr/include 269135875Sdougb.endif 270156813Sru.if ${MK_BIND_MTREE} != "no" 271135875Sdougb mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ 272135875Sdougb -p ${DESTDIR}/var/named 273135875Sdougb.endif 274218941Suqs.if ${MK_GROFF} != "no" 275218941Suqs mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.groff.dist -p ${DESTDIR}/usr 276218941Suqs.endif 277156813Sru.if ${MK_SENDMAIL} != "no" 27895144Sgshapiro mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ 27995144Sgshapiro.endif 280410Srgrimes cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys 28177993Sache cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . 282183698Sdes cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* . 28377993Sache cd ${DESTDIR}/usr/share/man; \ 28477993Sache set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 28577993Sache while [ $$# -gt 0 ] ; \ 28677993Sache do \ 28777993Sache rm -rf "$$1"; \ 28877993Sache ln -s "$$2" "$$1"; \ 28977993Sache shift; shift; \ 29077993Sache done 291110663Sache cd ${DESTDIR}/usr/share/openssl/man; \ 292110663Sache set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 293110663Sache while [ $$# -gt 0 ] ; \ 294110663Sache do \ 295110663Sache rm -rf "$$1"; \ 296110663Sache ln -s "$$2" "$$1"; \ 297110663Sache shift; shift; \ 298110663Sache done 299110655Snectar cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* . 30011635Sache cd ${DESTDIR}/usr/share/nls; \ 30177999Sache set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ 30211635Sache while [ $$# -gt 0 ] ; \ 30311635Sache do \ 30411635Sache rm -rf "$$1"; \ 30511635Sache ln -s "$$2" "$$1"; \ 30611635Sache shift; shift; \ 30777999Sache done 308147Srgrimes 30948185Ssheldonhetc-examples: 310100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 31199451Sru ${BIN1} ${BIN2} nsmb.conf opieaccess \ 31299451Sru ${DESTDIR}/usr/share/examples/etc 313173135Syar ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \ 314119385Smtm DESTDIR=${DESTDIR}/usr/share/examples 31548185Ssheldonh 31637Srgrimes.include <bsd.prog.mk> 317