Makefile revision 184343
11195Srgrimes# from: @(#)Makefile 5.11 (Berkeley) 5/21/91 250472Speter# $FreeBSD: head/etc/Makefile 184343 2008-10-27 16:13:28Z sam $ 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 \ 18145693Sbrooks rc rc.bsdextended rc.firewall rc.firewall6 rc.initdiskless \ 19145693Sbrooks rc.sendmail rc.shutdown \ 20183242Ssam rc.subr remote rpc services shells \ 21183242Ssam sysctl.conf syslog.conf \ 22183242Ssam etc.${MACHINE_ARCH}/ttys 23155210Srwatson 24155210SrwatsonOPENBSMDIR= ${.CURDIR}/../contrib/openbsm 25155210SrwatsonBSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \ 26155210Srwatson ${OPENBSMDIR}/etc/audit_event 27155210SrwatsonBSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \ 28155210Srwatson ${OPENBSMDIR}/etc/audit_user 29155210SrwatsonBSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn 30155210SrwatsonBSM_ETC_DIR= ${DESTDIR}/etc/security 31155210Srwatson 32183242Ssam# NB: keep these sorted by MK_* knobs 33183242Ssam 34183242Ssam.if ${MK_AMD} != "no" 35183242SsamBIN1+= amd.map 36183242Ssam.endif 37183242Ssam 38183242Ssam.if ${MK_APM} != "no" 39183242SsamBIN1+= apmd.conf 40183242Ssam.endif 41183242Ssam 42183242Ssam.if ${MK_BSNMP} != "no" 43183242SsamBIN1+= snmpd.config 44183242Ssam.endif 45183242Ssam 46183242Ssam.if ${MK_FREEBSD_UPDATE} != "no" 47183242SsamBIN1+= freebsd-update.conf 48183242Ssam.endif 49183242Ssam 50183242Ssam.if ${MK_LOCATE} != "no" 51183242SsamBIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc 52183242Ssam.endif 53183242Ssam 54156813Sru.if ${MK_LPR} != "no" 55183242SsamBIN1+= hosts.lpd printcap 56121911Smarkm.endif 5737Srgrimes 58183242Ssam.if ${MK_MAIL} != "no" 59183242SsamBIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc 60158115Sume.endif 61158115Sume 62183242Ssam.if ${MK_MAN} != "no" 63183242SsamBIN1+= ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config 64183242Ssam.endif 65183242Ssam 66156813Sru.if ${MK_OPENSSH} != "no" 6757488SpeterSSH= ${.CURDIR}/../crypto/openssh/ssh_config \ 6874837Sgreen ${.CURDIR}/../crypto/openssh/sshd_config \ 69124214Sdes ${.CURDIR}/../crypto/openssh/moduli 7057459Smarkm.endif 71156813Sru.if ${MK_OPENSSL} != "no" 7260677SkrisSSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf 7360677Skris.endif 7460677Skris 75183242Ssam.if ${MK_NS_CACHING} != "no" 76183242SsamBIN1+= nscd.conf 77183242Ssam.endif 78183242Ssam 79183242Ssam.if ${MK_PORTSNAP} != "no" 80183242SsamBIN1+= portsnap.conf 81183242Ssam.endif 82183242Ssam 83183242Ssam.if ${MK_PF} != "no" 84183242SsamBIN1+= pf.os 85183242Ssam.endif 86183242Ssam 87184343Ssam.if ${MK_TCSH} != "no" 88184343SsamBIN1+= csh.cshrc csh.login csh.logout 89184343Ssam.endif 90184343Ssam 91183268Ssam.if ${MK_WIRELESS} != "no" 92183268SsamBIN1+= regdomain.xml 93183268Ssam.endif 94183268Ssam 9582521Salex# -rwxr-xr-x root:wheel, for the new cron root:wheel 96108002SgreenBIN2= netstart pccard_ether rc.suspend rc.resume 97147Srgrimes 9827487SasamiMTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \ 9965168Sasami BSD.var.dist BSD.x11.dist BSD.x11-4.dist 100156813Sru.if ${MK_SENDMAIL} != "no" 10195144SgshapiroMTREE+= BSD.sendmail.dist 10295144Sgshapiro.endif 103156813Sru.if ${MK_BIND} != "no" 104135851SdougbMTREE+= BIND.chroot.dist 105156813Sru.if ${MK_BIND_LIBS} != "no" 106135851SdougbMTREE+= BIND.include.dist 107135851Sdougb.endif 108135851Sdougb.endif 10999451Sru 11099451SruPPPCNF= ppp.conf 11199451Sru 112156813Sru.if ${MK_SENDMAIL} == "no" 113117292SgshapiroETCMAIL=mailer.conf aliases 114117292Sgshapiro.else 11564598SgshapiroETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ 11664598Sgshapiro mailertable.sample aliases 117117292Sgshapiro.endif 11837Srgrimes 119263Srgrimes# Special top level files for FreeBSD 12099449SruFREEBSD=COPYRIGHT 121263Srgrimes 122124831Sruafterinstall: 123156813Sru.if ${MK_MAN} != "no" 124173135Syar ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb 125124831Sru.endif 126124831Sru 1274487Sphkdistribute: 128173135Syar ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} 129173135Syar ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} 1305948Sjkh 131142794Sru.include <bsd.endian.mk> 132142794Sru.if ${TARGET_ENDIANNESS} == "1234" 133152471SruCAP_MKDB_ENDIAN?= -l 134152471SruPWD_MKDB_ENDIAN?= -L 135142794Sru.elif ${TARGET_ENDIANNESS} == "4321" 136152471SruCAP_MKDB_ENDIAN?= -b 137152471SruPWD_MKDB_ENDIAN?= -B 138142794Sru.else 139149515SimpCAP_MKDB_ENDIAN?= 140149515SimpPWD_MKDB_ENDIAN?= 141142794Sru.endif 142142794Sru 1434487Sphkdistribution: 144148282Sru.if !defined(DESTDIR) 145148282Sru @echo "set DESTDIR before running \"make ${.TARGET}\"" 146148282Sru @false 147148282Sru.endif 14899449Sru cd ${.CURDIR}; \ 149100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 15099451Sru ${BIN1} ${DESTDIR}/etc; \ 151142794Sru cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ 152100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ 15399451Sru ${BIN2} ${DESTDIR}/etc; \ 154100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 155184343Ssam master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; 156184343Ssam.if ${MK_TCSH} == "no" 157184343Ssam sed -i "" -e 's;/bin/csh;;' ${DESTDIR}/etc/master.passwd 158184343Ssam.endif 159184343Ssam pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ 160184343Ssam ${DESTDIR}/etc/master.passwd 161183242Ssam.if ${MK_BLUETOOTH} != "no" 162173135Syar ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install 163183242Ssam.endif 164173135Syar ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install 165173135Syar ${_+_}cd ${.CURDIR}/gss; ${MAKE} install 166173135Syar ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install 167173135Syar ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install 168173135Syar ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall 169173135Syar ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap 170173135Syar ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt 171173135Syar ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install 172155210Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ 173155210Srwatson ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} 174155571Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \ 175155210Srwatson ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR} 176155210Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ 177155210Srwatson ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} 178170913Sdougb.if ${MK_BIND_MTREE} != "no" 179170913Sdougb @if [ ! -e ${DESTDIR}/etc/namedb ]; then \ 180170913Sdougb set -x; \ 181170913Sdougb ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ 182170913Sdougb fi 183170913Sdougb.endif 184170913Sdougb.if ${MK_BIND_ETC} != "no" 185173135Syar ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install 186170913Sdougb.endif 187156813Sru.if ${MK_SENDMAIL} != "no" 188173135Syar ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution 18973251Sgshapiro.endif 190156813Sru.if ${MK_OPENSSH} != "no" 191100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 19299451Sru ${SSH} ${DESTDIR}/etc/ssh 19357488Speter.endif 194156813Sru.if ${MK_OPENSSL} != "no" 195100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 19699451Sru ${SSL} ${DESTDIR}/etc/ssl 19760677Skris.endif 198156813Sru.if ${MK_KERBEROS} != "no" 19999449Sru cd ${.CURDIR}/root; \ 200100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 201120709Sphk dot.k5login ${DESTDIR}/root/.k5login; 202120709Sphk.endif 203120709Sphk cd ${.CURDIR}/root; \ 204120709Sphk ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 205184343Ssam dot.profile ${DESTDIR}/root/.profile; \ 206184343Ssam rm -f ${DESTDIR}/.profile; \ 207184343Ssam ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile 208184343Ssam.if ${MK_TCSH} != "no" 209184343Ssam cd ${.CURDIR}/root; \ 210184343Ssam ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 21199451Sru dot.cshrc ${DESTDIR}/root/.cshrc; \ 212100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 21399451Sru dot.login ${DESTDIR}/root/.login; \ 214184343Ssam rm -f ${DESTDIR}/.cshrc; \ 215184343Ssam ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc 216184343Ssam.endif 217100872Sru cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 2181731Sjkh ${MTREE} ${DESTDIR}/etc/mtree 219183242Ssam.if ${MK_PPP} != "no" 220119058Sobrien cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 2216177Samurai ${PPPCNF} ${DESTDIR}/etc/ppp 222183242Ssam.endif 223183242Ssam.if ${MK_MAIL} != "no" 224100872Sru cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 22564598Sgshapiro ${ETCMAIL} ${DESTDIR}/etc/mail 22664629Sgshapiro @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ 22764629Sgshapiro ! -f ${DESTDIR}/etc/aliases ]; then \ 22864629Sgshapiro set -x; \ 22964629Sgshapiro ln -s mail/aliases ${DESTDIR}/etc/aliases; \ 23064629Sgshapiro fi 231183242Ssam.endif 232100872Sru ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ 23337Srgrimes ${DESTDIR}/etc/dumpdates 234100872Sru ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ 235147Srgrimes ${DESTDIR}/var/db/locate.database 236100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ 2371759Sjkh ${DESTDIR}/var/crash 238100872Sru cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 23999451Sru ${FREEBSD} ${DESTDIR}/ 240171427Simp.if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints) 241126977Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 242126977Sru ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ 243126977Sru ${DESTDIR}/boot/device.hints 244171427Simp.endif 24537Srgrimes 246147Srgrimesdistrib-dirs: 247127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ 248127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var 249127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr 250127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ 2517129Srgrimes -p ${DESTDIR}/usr/include 252156813Sru.if ${MK_BIND_LIBS} != "no" 253135875Sdougb mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ 254135875Sdougb -p ${DESTDIR}/usr/include 255135875Sdougb.endif 256156813Sru.if ${MK_BIND_MTREE} != "no" 257135875Sdougb mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ 258135875Sdougb -p ${DESTDIR}/var/named 259135875Sdougb.endif 260156813Sru.if ${MK_SENDMAIL} != "no" 26195144Sgshapiro mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ 26295144Sgshapiro.endif 263410Srgrimes cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys 26477993Sache cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . 265183698Sdes cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* . 26677993Sache cd ${DESTDIR}/usr/share/man; \ 26777993Sache set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 26877993Sache while [ $$# -gt 0 ] ; \ 26977993Sache do \ 27077993Sache rm -rf "$$1"; \ 27177993Sache ln -s "$$2" "$$1"; \ 27277993Sache shift; shift; \ 27377993Sache done 274110663Sache cd ${DESTDIR}/usr/share/openssl/man; \ 275110663Sache set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 276110663Sache while [ $$# -gt 0 ] ; \ 277110663Sache do \ 278110663Sache rm -rf "$$1"; \ 279110663Sache ln -s "$$2" "$$1"; \ 280110663Sache shift; shift; \ 281110663Sache done 282110655Snectar cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* . 28311635Sache cd ${DESTDIR}/usr/share/nls; \ 28477999Sache set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ 28511635Sache while [ $$# -gt 0 ] ; \ 28611635Sache do \ 28711635Sache rm -rf "$$1"; \ 28811635Sache ln -s "$$2" "$$1"; \ 28911635Sache shift; shift; \ 29077999Sache done 291147Srgrimes 29248185Ssheldonhetc-examples: 293100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 29499451Sru ${BIN1} ${BIN2} nsmb.conf opieaccess \ 29599451Sru ${DESTDIR}/usr/share/examples/etc 296173135Syar ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \ 297119385Smtm DESTDIR=${DESTDIR}/usr/share/examples 29848185Ssheldonh 29937Srgrimes.include <bsd.prog.mk> 300