Makefile revision 231849
11195Srgrimes# from: @(#)Makefile 5.11 (Berkeley) 5/21/91 250472Speter# $FreeBSD: head/etc/Makefile 231849 2012-02-17 01:21:08Z eadler $ 337Srgrimes 4156813Sru.include <bsd.own.mk> 5156813Sru 6156813Sru.if ${MK_SENDMAIL} != "no" 738103SpeterSUBDIR= sendmail 873251Sgshapiro.endif 938103Speter 10231849SeadlerBIN1= auth.conf \ 11231849Seadler crontab \ 12231849Seadler devd.conf \ 13231849Seadler devfs.conf \ 14231849Seadler ddb.conf \ 15231849Seadler dhclient.conf \ 16231849Seadler disktab \ 17231849Seadler fbtab \ 18231849Seadler ftpusers \ 19231849Seadler gettytab \ 20231849Seadler group \ 21231849Seadler hosts \ 22231849Seadler hosts.allow \ 23231849Seadler hosts.equiv \ 24231849Seadler inetd.conf \ 25231849Seadler libalias.conf \ 26231849Seadler login.access \ 27231849Seadler login.conf \ 28231849Seadler mac.conf \ 29231849Seadler motd \ 30231849Seadler netconfig \ 31231849Seadler network.subr \ 32231849Seadler networks \ 33231849Seadler newsyslog.conf \ 34231849Seadler nsswitch.conf \ 35231849Seadler phones \ 36231849Seadler profile \ 37231849Seadler protocols \ 38231849Seadler rc \ 39231849Seadler rc.bsdextended \ 40231849Seadler rc.firewall \ 41231849Seadler rc.initdiskless \ 42231849Seadler rc.sendmail \ 43231849Seadler rc.shutdown \ 44231849Seadler rc.subr \ 45231849Seadler remote \ 46231849Seadler rpc \ 47231849Seadler services \ 48231849Seadler shells \ 49231849Seadler sysctl.conf \ 50231849Seadler syslog.conf \ 51231849Seadler termcap.small 52155210Srwatson 53199249Sed.if exists(${.CURDIR}/etc.${MACHINE}/ttys) 54199249SedBIN1+= etc.${MACHINE}/ttys 55209134Simp.elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys) 56209134SimpBIN1+= etc.${MACHINE_ARCH}/ttys 57209134Simp.elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys) 58209134SimpBIN1+= etc.${MACHINE_CPUARCH}/ttys 59199249Sed.else 60209134Simp.error etc.MACHINE/ttys missing 61199249Sed.endif 62199249Sed 63155210SrwatsonOPENBSMDIR= ${.CURDIR}/../contrib/openbsm 64155210SrwatsonBSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \ 65155210Srwatson ${OPENBSMDIR}/etc/audit_event 66155210SrwatsonBSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \ 67155210Srwatson ${OPENBSMDIR}/etc/audit_user 68155210SrwatsonBSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn 69155210SrwatsonBSM_ETC_DIR= ${DESTDIR}/etc/security 70155210Srwatson 71183242Ssam# NB: keep these sorted by MK_* knobs 72183242Ssam 73183242Ssam.if ${MK_AMD} != "no" 74183242SsamBIN1+= amd.map 75183242Ssam.endif 76183242Ssam 77183242Ssam.if ${MK_APM} != "no" 78183242SsamBIN1+= apmd.conf 79183242Ssam.endif 80183242Ssam 81183242Ssam.if ${MK_BSNMP} != "no" 82183242SsamBIN1+= snmpd.config 83183242Ssam.endif 84183242Ssam 85183242Ssam.if ${MK_FREEBSD_UPDATE} != "no" 86183242SsamBIN1+= freebsd-update.conf 87183242Ssam.endif 88183242Ssam 89183242Ssam.if ${MK_LOCATE} != "no" 90183242SsamBIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc 91183242Ssam.endif 92183242Ssam 93156813Sru.if ${MK_LPR} != "no" 94183242SsamBIN1+= hosts.lpd printcap 95121911Smarkm.endif 9637Srgrimes 97183242Ssam.if ${MK_MAIL} != "no" 98183242SsamBIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc 99158115Sume.endif 100158115Sume 101193635Sedwin.if ${MK_NTP} != "no" 102193635SedwinBIN1+= ntp.conf 103193635Sedwin.endif 104193635Sedwin 105156813Sru.if ${MK_OPENSSH} != "no" 10657488SpeterSSH= ${.CURDIR}/../crypto/openssh/ssh_config \ 10774837Sgreen ${.CURDIR}/../crypto/openssh/sshd_config \ 108124214Sdes ${.CURDIR}/../crypto/openssh/moduli 10957459Smarkm.endif 110156813Sru.if ${MK_OPENSSL} != "no" 11160677SkrisSSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf 11260677Skris.endif 11360677Skris 114183242Ssam.if ${MK_NS_CACHING} != "no" 115183242SsamBIN1+= nscd.conf 116183242Ssam.endif 117183242Ssam 118183242Ssam.if ${MK_PORTSNAP} != "no" 119183242SsamBIN1+= portsnap.conf 120183242Ssam.endif 121183242Ssam 122183242Ssam.if ${MK_PF} != "no" 123183242SsamBIN1+= pf.os 124183242Ssam.endif 125183242Ssam 126184343Ssam.if ${MK_TCSH} != "no" 127184343SsamBIN1+= csh.cshrc csh.login csh.logout 128184343Ssam.endif 129184343Ssam 130183268Ssam.if ${MK_WIRELESS} != "no" 131183268SsamBIN1+= regdomain.xml 132183268Ssam.endif 133183268Ssam 13482521Salex# -rwxr-xr-x root:wheel, for the new cron root:wheel 135108002SgreenBIN2= netstart pccard_ether rc.suspend rc.resume 136147Srgrimes 137196767SflzMTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist 138156813Sru.if ${MK_SENDMAIL} != "no" 13995144SgshapiroMTREE+= BSD.sendmail.dist 14095144Sgshapiro.endif 141156813Sru.if ${MK_BIND} != "no" 142135851SdougbMTREE+= BIND.chroot.dist 143156813Sru.if ${MK_BIND_LIBS} != "no" 144135851SdougbMTREE+= BIND.include.dist 145135851Sdougb.endif 146135851Sdougb.endif 14799451Sru 14899451SruPPPCNF= ppp.conf 14999451Sru 150156813Sru.if ${MK_SENDMAIL} == "no" 151117292SgshapiroETCMAIL=mailer.conf aliases 152117292Sgshapiro.else 15364598SgshapiroETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ 15464598Sgshapiro mailertable.sample aliases 155117292Sgshapiro.endif 15637Srgrimes 157263Srgrimes# Special top level files for FreeBSD 15899449SruFREEBSD=COPYRIGHT 159263Srgrimes 160124831Sruafterinstall: 161156813Sru.if ${MK_MAN} != "no" 162173135Syar ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb 163124831Sru.endif 164124831Sru 1654487Sphkdistribute: 166173135Syar ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} 167173135Syar ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} 1685948Sjkh 169142794Sru.include <bsd.endian.mk> 170142794Sru.if ${TARGET_ENDIANNESS} == "1234" 171152471SruCAP_MKDB_ENDIAN?= -l 172152471SruPWD_MKDB_ENDIAN?= -L 173142794Sru.elif ${TARGET_ENDIANNESS} == "4321" 174152471SruCAP_MKDB_ENDIAN?= -b 175152471SruPWD_MKDB_ENDIAN?= -B 176142794Sru.else 177149515SimpCAP_MKDB_ENDIAN?= 178149515SimpPWD_MKDB_ENDIAN?= 179142794Sru.endif 180142794Sru 1814487Sphkdistribution: 182148282Sru.if !defined(DESTDIR) 183148282Sru @echo "set DESTDIR before running \"make ${.TARGET}\"" 184148282Sru @false 185148282Sru.endif 18699449Sru cd ${.CURDIR}; \ 187100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 18899451Sru ${BIN1} ${DESTDIR}/etc; \ 189142794Sru cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ 190100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ 19199451Sru ${BIN2} ${DESTDIR}/etc; \ 192100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 193184343Ssam master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; 194205329Sed.if ${MK_AT} == "no" 195205335Sed sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab 196205329Sed.endif 197184343Ssam.if ${MK_TCSH} == "no" 198184443Smp sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd 199184343Ssam.endif 200184343Ssam pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ 201184343Ssam ${DESTDIR}/etc/master.passwd 202183242Ssam.if ${MK_BLUETOOTH} != "no" 203173135Syar ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install 204183242Ssam.endif 205173135Syar ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install 206186249Sthompsa ${_+_}cd ${.CURDIR}/devd; ${MAKE} install 207173135Syar ${_+_}cd ${.CURDIR}/gss; ${MAKE} install 208173135Syar ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install 209173135Syar ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install 210173135Syar ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall 211173135Syar ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap 212173135Syar ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt 213173135Syar ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install 214155210Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ 215155210Srwatson ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} 216155571Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \ 217155210Srwatson ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR} 218155210Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ 219155210Srwatson ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} 220170913Sdougb.if ${MK_BIND_MTREE} != "no" 221170913Sdougb @if [ ! -e ${DESTDIR}/etc/namedb ]; then \ 222170913Sdougb set -x; \ 223170913Sdougb ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ 224170913Sdougb fi 225170913Sdougb.endif 226170913Sdougb.if ${MK_BIND_ETC} != "no" 227173135Syar ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install 228170913Sdougb.endif 229156813Sru.if ${MK_SENDMAIL} != "no" 230173135Syar ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution 23173251Sgshapiro.endif 232156813Sru.if ${MK_OPENSSH} != "no" 233100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 23499451Sru ${SSH} ${DESTDIR}/etc/ssh 23557488Speter.endif 236156813Sru.if ${MK_OPENSSL} != "no" 237100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 23899451Sru ${SSL} ${DESTDIR}/etc/ssl 23960677Skris.endif 240156813Sru.if ${MK_KERBEROS} != "no" 24199449Sru cd ${.CURDIR}/root; \ 242100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 243120709Sphk dot.k5login ${DESTDIR}/root/.k5login; 244120709Sphk.endif 245120709Sphk cd ${.CURDIR}/root; \ 246120709Sphk ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 247184343Ssam dot.profile ${DESTDIR}/root/.profile; \ 248184343Ssam rm -f ${DESTDIR}/.profile; \ 249184343Ssam ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile 250184343Ssam.if ${MK_TCSH} != "no" 251184343Ssam cd ${.CURDIR}/root; \ 252184343Ssam ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 25399451Sru dot.cshrc ${DESTDIR}/root/.cshrc; \ 254100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 25599451Sru dot.login ${DESTDIR}/root/.login; \ 256184343Ssam rm -f ${DESTDIR}/.cshrc; \ 257184343Ssam ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc 258184343Ssam.endif 259100872Sru cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 2601731Sjkh ${MTREE} ${DESTDIR}/etc/mtree 261183242Ssam.if ${MK_PPP} != "no" 262119058Sobrien cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 2636177Samurai ${PPPCNF} ${DESTDIR}/etc/ppp 264183242Ssam.endif 265183242Ssam.if ${MK_MAIL} != "no" 266100872Sru cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 26764598Sgshapiro ${ETCMAIL} ${DESTDIR}/etc/mail 26864629Sgshapiro @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ 26964629Sgshapiro ! -f ${DESTDIR}/etc/aliases ]; then \ 27064629Sgshapiro set -x; \ 27164629Sgshapiro ln -s mail/aliases ${DESTDIR}/etc/aliases; \ 27264629Sgshapiro fi 273183242Ssam.endif 274100872Sru ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ 27537Srgrimes ${DESTDIR}/etc/dumpdates 276100872Sru ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ 277147Srgrimes ${DESTDIR}/var/db/locate.database 278100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ 2791759Sjkh ${DESTDIR}/var/crash 280100872Sru cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 28199451Sru ${FREEBSD} ${DESTDIR}/ 282209228Savg.if ${MK_BOOT} != "no" 283171427Simp.if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints) 284126977Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 285126977Sru ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ 286126977Sru ${DESTDIR}/boot/device.hints 287171427Simp.endif 288209228Savg.endif 289224765Sdougb.if ${MK_NIS} == "no" 290224765Sdougb sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \ 291224765Sdougb ${DESTDIR}/etc/nsswitch.conf 292224765Sdougb.endif 29337Srgrimes 294147Srgrimesdistrib-dirs: 295127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ 296127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var 297127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr 298127339Sdes mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ 2997129Srgrimes -p ${DESTDIR}/usr/include 300156813Sru.if ${MK_BIND_LIBS} != "no" 301135875Sdougb mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ 302135875Sdougb -p ${DESTDIR}/usr/include 303135875Sdougb.endif 304156813Sru.if ${MK_BIND_MTREE} != "no" 305135875Sdougb mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ 306135875Sdougb -p ${DESTDIR}/var/named 307135875Sdougb.endif 308218941Suqs.if ${MK_GROFF} != "no" 309218941Suqs mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.groff.dist -p ${DESTDIR}/usr 310218941Suqs.endif 311156813Sru.if ${MK_SENDMAIL} != "no" 31295144Sgshapiro mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ 31395144Sgshapiro.endif 314410Srgrimes cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys 31577993Sache cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . 316183698Sdes cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* . 31777993Sache cd ${DESTDIR}/usr/share/man; \ 31877993Sache set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 31977993Sache while [ $$# -gt 0 ] ; \ 32077993Sache do \ 32177993Sache rm -rf "$$1"; \ 32277993Sache ln -s "$$2" "$$1"; \ 32377993Sache shift; shift; \ 32477993Sache done 325110663Sache cd ${DESTDIR}/usr/share/openssl/man; \ 326110663Sache set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 327110663Sache while [ $$# -gt 0 ] ; \ 328110663Sache do \ 329110663Sache rm -rf "$$1"; \ 330110663Sache ln -s "$$2" "$$1"; \ 331110663Sache shift; shift; \ 332110663Sache done 333110655Snectar cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* . 33411635Sache cd ${DESTDIR}/usr/share/nls; \ 33577999Sache set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ 33611635Sache while [ $$# -gt 0 ] ; \ 33711635Sache do \ 33811635Sache rm -rf "$$1"; \ 33911635Sache ln -s "$$2" "$$1"; \ 34011635Sache shift; shift; \ 34177999Sache done 342147Srgrimes 34348185Ssheldonhetc-examples: 344100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 34599451Sru ${BIN1} ${BIN2} nsmb.conf opieaccess \ 34699451Sru ${DESTDIR}/usr/share/examples/etc 347173135Syar ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \ 348119385Smtm DESTDIR=${DESTDIR}/usr/share/examples 34948185Ssheldonh 35037Srgrimes.include <bsd.prog.mk> 351