Makefile revision 209134
11195Srgrimes# from: @(#)Makefile 5.11 (Berkeley) 5/21/91 250472Speter# $FreeBSD: head/etc/Makefile 209134 2010-06-13 16:35:20Z imp $ 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 71208320Sjkim.if ${MK_MAN_UTILS} != "no" 72183242SsamBIN1+= ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config 73183242Ssam.endif 74183242Ssam 75193635Sedwin.if ${MK_NTP} != "no" 76193635SedwinBIN1+= ntp.conf 77193635Sedwin.endif 78193635Sedwin 79156813Sru.if ${MK_OPENSSH} != "no" 8057488SpeterSSH= ${.CURDIR}/../crypto/openssh/ssh_config \ 8174837Sgreen ${.CURDIR}/../crypto/openssh/sshd_config \ 82124214Sdes ${.CURDIR}/../crypto/openssh/moduli 8357459Smarkm.endif 84156813Sru.if ${MK_OPENSSL} != "no" 8560677SkrisSSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf 8660677Skris.endif 8760677Skris 88183242Ssam.if ${MK_NS_CACHING} != "no" 89183242SsamBIN1+= nscd.conf 90183242Ssam.endif 91183242Ssam 92183242Ssam.if ${MK_PORTSNAP} != "no" 93183242SsamBIN1+= portsnap.conf 94183242Ssam.endif 95183242Ssam 96183242Ssam.if ${MK_PF} != "no" 97183242SsamBIN1+= pf.os 98183242Ssam.endif 99183242Ssam 100184343Ssam.if ${MK_TCSH} != "no" 101184343SsamBIN1+= csh.cshrc csh.login csh.logout 102184343Ssam.endif 103184343Ssam 104183268Ssam.if ${MK_WIRELESS} != "no" 105183268SsamBIN1+= regdomain.xml 106183268Ssam.endif 107183268Ssam 10882521Salex# -rwxr-xr-x root:wheel, for the new cron root:wheel 109108002SgreenBIN2= netstart pccard_ether rc.suspend rc.resume 110147Srgrimes 111196767SflzMTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist 112156813Sru.if ${MK_SENDMAIL} != "no" 11395144SgshapiroMTREE+= BSD.sendmail.dist 11495144Sgshapiro.endif 115156813Sru.if ${MK_BIND} != "no" 116135851SdougbMTREE+= BIND.chroot.dist 117156813Sru.if ${MK_BIND_LIBS} != "no" 118135851SdougbMTREE+= BIND.include.dist 119135851Sdougb.endif 120135851Sdougb.endif 12199451Sru 12299451SruPPPCNF= ppp.conf 12399451Sru 124156813Sru.if ${MK_SENDMAIL} == "no" 125117292SgshapiroETCMAIL=mailer.conf aliases 126117292Sgshapiro.else 12764598SgshapiroETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ 12864598Sgshapiro mailertable.sample aliases 129117292Sgshapiro.endif 13037Srgrimes 131263Srgrimes# Special top level files for FreeBSD 13299449SruFREEBSD=COPYRIGHT 133263Srgrimes 134124831Sruafterinstall: 135156813Sru.if ${MK_MAN} != "no" 136173135Syar ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb 137124831Sru.endif 138124831Sru 1394487Sphkdistribute: 140173135Syar ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} 141173135Syar ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} 1425948Sjkh 143142794Sru.include <bsd.endian.mk> 144142794Sru.if ${TARGET_ENDIANNESS} == "1234" 145152471SruCAP_MKDB_ENDIAN?= -l 146152471SruPWD_MKDB_ENDIAN?= -L 147142794Sru.elif ${TARGET_ENDIANNESS} == "4321" 148152471SruCAP_MKDB_ENDIAN?= -b 149152471SruPWD_MKDB_ENDIAN?= -B 150142794Sru.else 151149515SimpCAP_MKDB_ENDIAN?= 152149515SimpPWD_MKDB_ENDIAN?= 153142794Sru.endif 154142794Sru 1554487Sphkdistribution: 156148282Sru.if !defined(DESTDIR) 157148282Sru @echo "set DESTDIR before running \"make ${.TARGET}\"" 158148282Sru @false 159148282Sru.endif 16099449Sru cd ${.CURDIR}; \ 161100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 16299451Sru ${BIN1} ${DESTDIR}/etc; \ 163142794Sru cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ 164100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ 16599451Sru ${BIN2} ${DESTDIR}/etc; \ 166100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 167184343Ssam master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; 168205329Sed.if ${MK_AT} == "no" 169205335Sed sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab 170205329Sed.endif 171184343Ssam.if ${MK_TCSH} == "no" 172184443Smp sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd 173184343Ssam.endif 174184343Ssam pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ 175184343Ssam ${DESTDIR}/etc/master.passwd 176183242Ssam.if ${MK_BLUETOOTH} != "no" 177173135Syar ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install 178183242Ssam.endif 179173135Syar ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install 180186249Sthompsa ${_+_}cd ${.CURDIR}/devd; ${MAKE} install 181173135Syar ${_+_}cd ${.CURDIR}/gss; ${MAKE} install 182173135Syar ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install 183173135Syar ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install 184173135Syar ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall 185173135Syar ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap 186173135Syar ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt 187173135Syar ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install 188155210Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ 189155210Srwatson ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} 190155571Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \ 191155210Srwatson ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR} 192155210Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ 193155210Srwatson ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} 194170913Sdougb.if ${MK_BIND_MTREE} != "no" 195170913Sdougb @if [ ! -e ${DESTDIR}/etc/namedb ]; then \ 196170913Sdougb set -x; \ 197170913Sdougb ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ 198170913Sdougb fi 199170913Sdougb.endif 200170913Sdougb.if ${MK_BIND_ETC} != "no" 201173135Syar ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install 202170913Sdougb.endif 203156813Sru.if ${MK_SENDMAIL} != "no" 204173135Syar ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution 20573251Sgshapiro.endif 206156813Sru.if ${MK_OPENSSH} != "no" 207100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 20899451Sru ${SSH} ${DESTDIR}/etc/ssh 20957488Speter.endif 210156813Sru.if ${MK_OPENSSL} != "no" 211100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 21299451Sru ${SSL} ${DESTDIR}/etc/ssl 21360677Skris.endif 214156813Sru.if ${MK_KERBEROS} != "no" 21599449Sru cd ${.CURDIR}/root; \ 216100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 217120709Sphk dot.k5login ${DESTDIR}/root/.k5login; 218120709Sphk.endif 219120709Sphk cd ${.CURDIR}/root; \ 220120709Sphk ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 221184343Ssam dot.profile ${DESTDIR}/root/.profile; \ 222184343Ssam rm -f ${DESTDIR}/.profile; \ 223184343Ssam ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile 224184343Ssam.if ${MK_TCSH} != "no" 225184343Ssam cd ${.CURDIR}/root; \ 226184343Ssam ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 22799451Sru dot.cshrc ${DESTDIR}/root/.cshrc; \ 228100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 22999451Sru dot.login ${DESTDIR}/root/.login; \ 230184343Ssam rm -f ${DESTDIR}/.cshrc; \ 231184343Ssam ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc 232184343Ssam.endif 233100872Sru cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 2341731Sjkh ${MTREE} ${DESTDIR}/etc/mtree 235183242Ssam.if ${MK_PPP} != "no" 236119058Sobrien cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 2376177Samurai ${PPPCNF} ${DESTDIR}/etc/ppp 238183242Ssam.endif 239183242Ssam.if ${MK_MAIL} != "no" 240100872Sru cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 24164598Sgshapiro ${ETCMAIL} ${DESTDIR}/etc/mail 24264629Sgshapiro @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ 24364629Sgshapiro ! -f ${DESTDIR}/etc/aliases ]; then \ 24464629Sgshapiro set -x; \ 24564629Sgshapiro ln -s mail/aliases ${DESTDIR}/etc/aliases; \ 24664629Sgshapiro fi 247183242Ssam.endif 248100872Sru ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ 24937Srgrimes ${DESTDIR}/etc/dumpdates 250100872Sru ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ 251147Srgrimes ${DESTDIR}/var/db/locate.database 252100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ 2531759Sjkh ${DESTDIR}/var/crash 254100872Sru cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 25599451Sru ${FREEBSD} ${DESTDIR}/ 256171427Simp.if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints) 257126977Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 258126977Sru ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ 259126977Sru ${DESTDIR}/boot/device.hints 260171427Simp.endif 26137Srgrimes 262147Srgrimesdistrib-dirs: 263127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ 264127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var 265127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr 266127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ 2677129Srgrimes -p ${DESTDIR}/usr/include 268156813Sru.if ${MK_BIND_LIBS} != "no" 269135875Sdougb mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ 270135875Sdougb -p ${DESTDIR}/usr/include 271135875Sdougb.endif 272156813Sru.if ${MK_BIND_MTREE} != "no" 273135875Sdougb mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ 274135875Sdougb -p ${DESTDIR}/var/named 275135875Sdougb.endif 276156813Sru.if ${MK_SENDMAIL} != "no" 27795144Sgshapiro mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ 27895144Sgshapiro.endif 279410Srgrimes cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys 28077993Sache cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . 281183698Sdes cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* . 28277993Sache cd ${DESTDIR}/usr/share/man; \ 28377993Sache set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 28477993Sache while [ $$# -gt 0 ] ; \ 28577993Sache do \ 28677993Sache rm -rf "$$1"; \ 28777993Sache ln -s "$$2" "$$1"; \ 28877993Sache shift; shift; \ 28977993Sache done 290110663Sache cd ${DESTDIR}/usr/share/openssl/man; \ 291110663Sache set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 292110663Sache while [ $$# -gt 0 ] ; \ 293110663Sache do \ 294110663Sache rm -rf "$$1"; \ 295110663Sache ln -s "$$2" "$$1"; \ 296110663Sache shift; shift; \ 297110663Sache done 298110655Snectar cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* . 29911635Sache cd ${DESTDIR}/usr/share/nls; \ 30077999Sache set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ 30111635Sache while [ $$# -gt 0 ] ; \ 30211635Sache do \ 30311635Sache rm -rf "$$1"; \ 30411635Sache ln -s "$$2" "$$1"; \ 30511635Sache shift; shift; \ 30677999Sache done 307147Srgrimes 30848185Ssheldonhetc-examples: 309100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 31099451Sru ${BIN1} ${BIN2} nsmb.conf opieaccess \ 31199451Sru ${DESTDIR}/usr/share/examples/etc 312173135Syar ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \ 313119385Smtm DESTDIR=${DESTDIR}/usr/share/examples 31448185Ssheldonh 31537Srgrimes.include <bsd.prog.mk> 316