Makefile revision 243101
11195Srgrimes# from: @(#)Makefile 5.11 (Berkeley) 5/21/91 250472Speter# $FreeBSD: head/etc/Makefile 243101 2012-11-15 20:37:38Z eadler $ 337Srgrimes 4156813Sru.include <bsd.own.mk> 5156813Sru 6156813Sru.if ${MK_SENDMAIL} != "no" 738103SpeterSUBDIR= sendmail 873251Sgshapiro.endif 938103Speter 10236965SdesBIN1= crontab \ 11231849Seadler devd.conf \ 12231849Seadler devfs.conf \ 13231849Seadler ddb.conf \ 14231849Seadler dhclient.conf \ 15231849Seadler disktab \ 16231849Seadler fbtab \ 17231849Seadler ftpusers \ 18231849Seadler gettytab \ 19231849Seadler group \ 20231849Seadler hosts \ 21231849Seadler hosts.allow \ 22231849Seadler hosts.equiv \ 23231849Seadler inetd.conf \ 24231849Seadler libalias.conf \ 25231849Seadler login.access \ 26231849Seadler login.conf \ 27231849Seadler mac.conf \ 28231849Seadler motd \ 29231849Seadler netconfig \ 30231849Seadler network.subr \ 31231849Seadler networks \ 32231849Seadler newsyslog.conf \ 33231849Seadler nsswitch.conf \ 34231849Seadler phones \ 35231849Seadler profile \ 36231849Seadler protocols \ 37231849Seadler rc \ 38231849Seadler rc.bsdextended \ 39231849Seadler rc.firewall \ 40231849Seadler rc.initdiskless \ 41231849Seadler rc.sendmail \ 42231849Seadler rc.shutdown \ 43231849Seadler rc.subr \ 44231849Seadler remote \ 45231849Seadler rpc \ 46231849Seadler services \ 47231849Seadler shells \ 48231849Seadler sysctl.conf \ 49231849Seadler syslog.conf \ 50231849Seadler termcap.small 51155210Srwatson 52199249Sed.if exists(${.CURDIR}/etc.${MACHINE}/ttys) 53199249SedBIN1+= etc.${MACHINE}/ttys 54209134Simp.elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys) 55209134SimpBIN1+= etc.${MACHINE_ARCH}/ttys 56209134Simp.elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys) 57209134SimpBIN1+= etc.${MACHINE_CPUARCH}/ttys 58199249Sed.else 59209134Simp.error etc.MACHINE/ttys missing 60199249Sed.endif 61199249Sed 62155210SrwatsonOPENBSMDIR= ${.CURDIR}/../contrib/openbsm 63155210SrwatsonBSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \ 64155210Srwatson ${OPENBSMDIR}/etc/audit_event 65155210SrwatsonBSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \ 66155210Srwatson ${OPENBSMDIR}/etc/audit_user 67155210SrwatsonBSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn 68155210SrwatsonBSM_ETC_DIR= ${DESTDIR}/etc/security 69155210Srwatson 70183242Ssam# NB: keep these sorted by MK_* knobs 71183242Ssam 72183242Ssam.if ${MK_AMD} != "no" 73183242SsamBIN1+= amd.map 74183242Ssam.endif 75183242Ssam 76183242Ssam.if ${MK_APM} != "no" 77183242SsamBIN1+= apmd.conf 78183242Ssam.endif 79183242Ssam 80183242Ssam.if ${MK_BSNMP} != "no" 81183242SsamBIN1+= snmpd.config 82183242Ssam.endif 83183242Ssam 84183242Ssam.if ${MK_FREEBSD_UPDATE} != "no" 85183242SsamBIN1+= freebsd-update.conf 86183242Ssam.endif 87183242Ssam 88183242Ssam.if ${MK_LOCATE} != "no" 89183242SsamBIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc 90183242Ssam.endif 91183242Ssam 92156813Sru.if ${MK_LPR} != "no" 93183242SsamBIN1+= hosts.lpd printcap 94121911Smarkm.endif 9537Srgrimes 96183242Ssam.if ${MK_MAIL} != "no" 97183242SsamBIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc 98158115Sume.endif 99158115Sume 100193635Sedwin.if ${MK_NTP} != "no" 101193635SedwinBIN1+= ntp.conf 102193635Sedwin.endif 103193635Sedwin 104156813Sru.if ${MK_OPENSSH} != "no" 10557488SpeterSSH= ${.CURDIR}/../crypto/openssh/ssh_config \ 10674837Sgreen ${.CURDIR}/../crypto/openssh/sshd_config \ 107124214Sdes ${.CURDIR}/../crypto/openssh/moduli 10857459Smarkm.endif 109156813Sru.if ${MK_OPENSSL} != "no" 11060677SkrisSSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf 11160677Skris.endif 11260677Skris 113183242Ssam.if ${MK_NS_CACHING} != "no" 114183242SsamBIN1+= nscd.conf 115183242Ssam.endif 116183242Ssam 117183242Ssam.if ${MK_PORTSNAP} != "no" 118183242SsamBIN1+= portsnap.conf 119183242Ssam.endif 120183242Ssam 121183242Ssam.if ${MK_PF} != "no" 122183242SsamBIN1+= pf.os 123183242Ssam.endif 124183242Ssam 125184343Ssam.if ${MK_TCSH} != "no" 126184343SsamBIN1+= csh.cshrc csh.login csh.logout 127184343Ssam.endif 128184343Ssam 129183268Ssam.if ${MK_WIRELESS} != "no" 130183268SsamBIN1+= regdomain.xml 131183268Ssam.endif 132183268Ssam 13382521Salex# -rwxr-xr-x root:wheel, for the new cron root:wheel 134108002SgreenBIN2= netstart pccard_ether rc.suspend rc.resume 135147Srgrimes 136196767SflzMTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist 137156813Sru.if ${MK_SENDMAIL} != "no" 13895144SgshapiroMTREE+= BSD.sendmail.dist 13995144Sgshapiro.endif 140156813Sru.if ${MK_BIND} != "no" 141135851SdougbMTREE+= BIND.chroot.dist 142156813Sru.if ${MK_BIND_LIBS} != "no" 143135851SdougbMTREE+= BIND.include.dist 144135851Sdougb.endif 145135851Sdougb.endif 14699451Sru 14799451SruPPPCNF= ppp.conf 14899451Sru 149156813Sru.if ${MK_SENDMAIL} == "no" 150117292SgshapiroETCMAIL=mailer.conf aliases 151117292Sgshapiro.else 15264598SgshapiroETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ 15364598Sgshapiro mailertable.sample aliases 154117292Sgshapiro.endif 15537Srgrimes 156263Srgrimes# Special top level files for FreeBSD 15799449SruFREEBSD=COPYRIGHT 158263Srgrimes 159124831Sruafterinstall: 160156813Sru.if ${MK_MAN} != "no" 161173135Syar ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb 162124831Sru.endif 163124831Sru 1644487Sphkdistribute: 165173135Syar ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} 166173135Syar ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} 1675948Sjkh 168142794Sru.include <bsd.endian.mk> 169142794Sru.if ${TARGET_ENDIANNESS} == "1234" 170152471SruCAP_MKDB_ENDIAN?= -l 171152471SruPWD_MKDB_ENDIAN?= -L 172142794Sru.elif ${TARGET_ENDIANNESS} == "4321" 173152471SruCAP_MKDB_ENDIAN?= -b 174152471SruPWD_MKDB_ENDIAN?= -B 175142794Sru.else 176149515SimpCAP_MKDB_ENDIAN?= 177149515SimpPWD_MKDB_ENDIAN?= 178142794Sru.endif 179142794Sru 1804487Sphkdistribution: 181148282Sru.if !defined(DESTDIR) 182148282Sru @echo "set DESTDIR before running \"make ${.TARGET}\"" 183148282Sru @false 184148282Sru.endif 18599449Sru cd ${.CURDIR}; \ 186100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 18799451Sru ${BIN1} ${DESTDIR}/etc; \ 188142794Sru cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ 189100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ 19099451Sru ${BIN2} ${DESTDIR}/etc; \ 191100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 192184343Ssam master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; 193205329Sed.if ${MK_AT} == "no" 194205335Sed sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab 195205329Sed.endif 196184343Ssam.if ${MK_TCSH} == "no" 197184443Smp sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd 198184343Ssam.endif 199184343Ssam pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ 200184343Ssam ${DESTDIR}/etc/master.passwd 201241823Smarcel.if ${MK_ATF} != "no" 202241823Smarcel ${_+_}cd ${.CURDIR}/atf; ${MAKE} install 203241823Smarcel.endif 204183242Ssam.if ${MK_BLUETOOTH} != "no" 205173135Syar ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install 206183242Ssam.endif 207173135Syar ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install 208186249Sthompsa ${_+_}cd ${.CURDIR}/devd; ${MAKE} install 209173135Syar ${_+_}cd ${.CURDIR}/gss; ${MAKE} install 210173135Syar ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install 211173135Syar ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install 212173135Syar ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall 213173135Syar ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap 214173135Syar ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt 215173135Syar ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install 216155210Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ 217155210Srwatson ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} 218155571Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \ 219155210Srwatson ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR} 220155210Srwatson cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ 221155210Srwatson ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} 222170913Sdougb.if ${MK_BIND_MTREE} != "no" 223243101Seadler if [ ! -e ${DESTDIR}/etc/namedb ]; then \ 224170913Sdougb ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ 225170913Sdougb fi 226170913Sdougb.endif 227170913Sdougb.if ${MK_BIND_ETC} != "no" 228173135Syar ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install 229170913Sdougb.endif 230156813Sru.if ${MK_SENDMAIL} != "no" 231173135Syar ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution 23273251Sgshapiro.endif 233156813Sru.if ${MK_OPENSSH} != "no" 234100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 23599451Sru ${SSH} ${DESTDIR}/etc/ssh 23657488Speter.endif 237156813Sru.if ${MK_OPENSSL} != "no" 238100872Sru cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 23999451Sru ${SSL} ${DESTDIR}/etc/ssl 24060677Skris.endif 241156813Sru.if ${MK_KERBEROS} != "no" 24299449Sru cd ${.CURDIR}/root; \ 243100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 244120709Sphk dot.k5login ${DESTDIR}/root/.k5login; 245120709Sphk.endif 246120709Sphk cd ${.CURDIR}/root; \ 247120709Sphk ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 248184343Ssam dot.profile ${DESTDIR}/root/.profile; \ 249184343Ssam rm -f ${DESTDIR}/.profile; \ 250184343Ssam ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile 251184343Ssam.if ${MK_TCSH} != "no" 252184343Ssam cd ${.CURDIR}/root; \ 253184343Ssam ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 25499451Sru dot.cshrc ${DESTDIR}/root/.cshrc; \ 255100872Sru ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 25699451Sru dot.login ${DESTDIR}/root/.login; \ 257184343Ssam rm -f ${DESTDIR}/.cshrc; \ 258184343Ssam ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc 259184343Ssam.endif 260100872Sru cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 2611731Sjkh ${MTREE} ${DESTDIR}/etc/mtree 262183242Ssam.if ${MK_PPP} != "no" 263119058Sobrien cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 2646177Samurai ${PPPCNF} ${DESTDIR}/etc/ppp 265183242Ssam.endif 266183242Ssam.if ${MK_MAIL} != "no" 267100872Sru cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 26864598Sgshapiro ${ETCMAIL} ${DESTDIR}/etc/mail 269243101Seadler if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ 27064629Sgshapiro ! -f ${DESTDIR}/etc/aliases ]; then \ 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