Makefile revision 184443
191094Sdes# from: @(#)Makefile 5.11 (Berkeley) 5/21/91 292289Sdes# $FreeBSD: head/etc/Makefile 184443 2008-10-29 18:46:47Z mp $ 391094Sdes 491094Sdes.include <bsd.own.mk> 591094Sdes 699158Sdes.if ${MK_SENDMAIL} != "no" 799158SdesSUBDIR= sendmail 899158Sdes.endif 991094Sdes 1091094SdesBIN1= auth.conf \ 1191094Sdes crontab devd.conf devfs.conf \ 1291094Sdes ddb.conf dhclient.conf disktab fbtab \ 1391094Sdes ftpusers gettytab group \ 1491094Sdes hosts hosts.allow hosts.equiv \ 1591094Sdes inetd.conf libalias.conf login.access login.conf mac.conf motd \ 1691094Sdes netconfig network.subr networks newsyslog.conf nsswitch.conf \ 1791094Sdes phones profile protocols \ 1891094Sdes rc rc.bsdextended rc.firewall rc.firewall6 rc.initdiskless \ 1991094Sdes rc.sendmail rc.shutdown \ 2091094Sdes rc.subr remote rpc services shells \ 2191094Sdes sysctl.conf syslog.conf \ 2291094Sdes etc.${MACHINE_ARCH}/ttys 2391094Sdes 2491094SdesOPENBSMDIR= ${.CURDIR}/../contrib/openbsm 2591094SdesBSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \ 2691094Sdes ${OPENBSMDIR}/etc/audit_event 2791094SdesBSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \ 2891094Sdes ${OPENBSMDIR}/etc/audit_user 2991094SdesBSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn 3091094SdesBSM_ETC_DIR= ${DESTDIR}/etc/security 3191094Sdes 3291094Sdes# NB: keep these sorted by MK_* knobs 3391094Sdes 34107937Sdes.if ${MK_AMD} != "no" 3591094SdesBIN1+= amd.map 3691094Sdes.endif 3791094Sdes 3891094Sdes.if ${MK_APM} != "no" 3991094SdesBIN1+= apmd.conf 4091094Sdes.endif 4191094Sdes 4291094Sdes.if ${MK_BSNMP} != "no" 4391100SdesBIN1+= snmpd.config 4491094Sdes.endif 4591094Sdes 4691094Sdes.if ${MK_FREEBSD_UPDATE} != "no" 4791094SdesBIN1+= freebsd-update.conf 4891094Sdes.endif 4991094Sdes 5091094Sdes.if ${MK_LOCATE} != "no" 5191094SdesBIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc 5291094Sdes.endif 5391094Sdes 5491094Sdes.if ${MK_LPR} != "no" 5591094SdesBIN1+= hosts.lpd printcap 5691094Sdes.endif 57107937Sdes 5891094Sdes.if ${MK_MAIL} != "no" 59107937SdesBIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc 6091100Sdes.endif 6191100Sdes 6291100Sdes.if ${MK_MAN} != "no" 6391100SdesBIN1+= ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config 64107937Sdes.endif 6591100Sdes 6691094Sdes.if ${MK_OPENSSH} != "no" 6791094SdesSSH= ${.CURDIR}/../crypto/openssh/ssh_config \ 6891094Sdes ${.CURDIR}/../crypto/openssh/sshd_config \ 6991094Sdes ${.CURDIR}/../crypto/openssh/moduli 7091094Sdes.endif 7191100Sdes.if ${MK_OPENSSL} != "no" 7291100SdesSSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf 73107937Sdes.endif 7491094Sdes 7591094Sdes.if ${MK_NS_CACHING} != "no" 7691100SdesBIN1+= nscd.conf 77107937Sdes.endif 7891094Sdes 7991100Sdes.if ${MK_PORTSNAP} != "no" 8091100SdesBIN1+= portsnap.conf 8191100Sdes.endif 8291100Sdes 8391100Sdes.if ${MK_PF} != "no" 8491100SdesBIN1+= pf.os 8591100Sdes.endif 8691100Sdes 8791100Sdes.if ${MK_TCSH} != "no" 8891100SdesBIN1+= csh.cshrc csh.login csh.logout 8991100Sdes.endif 9099158Sdes 9191100Sdes.if ${MK_WIRELESS} != "no" 9291100SdesBIN1+= regdomain.xml 9391100Sdes.endif 9491100Sdes 9591100Sdes# -rwxr-xr-x root:wheel, for the new cron root:wheel 9691100SdesBIN2= netstart pccard_ether rc.suspend rc.resume 9791100Sdes 9891100SdesMTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \ 9991100Sdes BSD.var.dist BSD.x11.dist BSD.x11-4.dist 10091100Sdes.if ${MK_SENDMAIL} != "no" 10191100SdesMTREE+= BSD.sendmail.dist 10291100Sdes.endif 10391100Sdes.if ${MK_BIND} != "no" 104MTREE+= BIND.chroot.dist 105.if ${MK_BIND_LIBS} != "no" 106MTREE+= BIND.include.dist 107.endif 108.endif 109 110PPPCNF= ppp.conf 111 112.if ${MK_SENDMAIL} == "no" 113ETCMAIL=mailer.conf aliases 114.else 115ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ 116 mailertable.sample aliases 117.endif 118 119# Special top level files for FreeBSD 120FREEBSD=COPYRIGHT 121 122afterinstall: 123.if ${MK_MAN} != "no" 124 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb 125.endif 126 127distribute: 128 ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} 129 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} 130 131.include <bsd.endian.mk> 132.if ${TARGET_ENDIANNESS} == "1234" 133CAP_MKDB_ENDIAN?= -l 134PWD_MKDB_ENDIAN?= -L 135.elif ${TARGET_ENDIANNESS} == "4321" 136CAP_MKDB_ENDIAN?= -b 137PWD_MKDB_ENDIAN?= -B 138.else 139CAP_MKDB_ENDIAN?= 140PWD_MKDB_ENDIAN?= 141.endif 142 143distribution: 144.if !defined(DESTDIR) 145 @echo "set DESTDIR before running \"make ${.TARGET}\"" 146 @false 147.endif 148 cd ${.CURDIR}; \ 149 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 150 ${BIN1} ${DESTDIR}/etc; \ 151 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ 152 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ 153 ${BIN2} ${DESTDIR}/etc; \ 154 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 155 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; 156.if ${MK_TCSH} == "no" 157 sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd 158.endif 159 pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ 160 ${DESTDIR}/etc/master.passwd 161.if ${MK_BLUETOOTH} != "no" 162 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install 163.endif 164 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install 165 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install 166 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install 167 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install 168 ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall 169 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap 170 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt 171 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install 172 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ 173 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} 174 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \ 175 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR} 176 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ 177 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} 178.if ${MK_BIND_MTREE} != "no" 179 @if [ ! -e ${DESTDIR}/etc/namedb ]; then \ 180 set -x; \ 181 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ 182 fi 183.endif 184.if ${MK_BIND_ETC} != "no" 185 ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install 186.endif 187.if ${MK_SENDMAIL} != "no" 188 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution 189.endif 190.if ${MK_OPENSSH} != "no" 191 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 192 ${SSH} ${DESTDIR}/etc/ssh 193.endif 194.if ${MK_OPENSSL} != "no" 195 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 196 ${SSL} ${DESTDIR}/etc/ssl 197.endif 198.if ${MK_KERBEROS} != "no" 199 cd ${.CURDIR}/root; \ 200 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 201 dot.k5login ${DESTDIR}/root/.k5login; 202.endif 203 cd ${.CURDIR}/root; \ 204 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 205 dot.profile ${DESTDIR}/root/.profile; \ 206 rm -f ${DESTDIR}/.profile; \ 207 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile 208.if ${MK_TCSH} != "no" 209 cd ${.CURDIR}/root; \ 210 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 211 dot.cshrc ${DESTDIR}/root/.cshrc; \ 212 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 213 dot.login ${DESTDIR}/root/.login; \ 214 rm -f ${DESTDIR}/.cshrc; \ 215 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc 216.endif 217 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 218 ${MTREE} ${DESTDIR}/etc/mtree 219.if ${MK_PPP} != "no" 220 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 221 ${PPPCNF} ${DESTDIR}/etc/ppp 222.endif 223.if ${MK_MAIL} != "no" 224 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 225 ${ETCMAIL} ${DESTDIR}/etc/mail 226 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ 227 ! -f ${DESTDIR}/etc/aliases ]; then \ 228 set -x; \ 229 ln -s mail/aliases ${DESTDIR}/etc/aliases; \ 230 fi 231.endif 232 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ 233 ${DESTDIR}/etc/dumpdates 234 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ 235 ${DESTDIR}/var/db/locate.database 236 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ 237 ${DESTDIR}/var/crash 238 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 239 ${FREEBSD} ${DESTDIR}/ 240.if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints) 241 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 242 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ 243 ${DESTDIR}/boot/device.hints 244.endif 245 246distrib-dirs: 247 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ 248 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var 249 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr 250 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ 251 -p ${DESTDIR}/usr/include 252.if ${MK_BIND_LIBS} != "no" 253 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ 254 -p ${DESTDIR}/usr/include 255.endif 256.if ${MK_BIND_MTREE} != "no" 257 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ 258 -p ${DESTDIR}/var/named 259.endif 260.if ${MK_SENDMAIL} != "no" 261 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ 262.endif 263 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys 264 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . 265 cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* . 266 cd ${DESTDIR}/usr/share/man; \ 267 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 268 while [ $$# -gt 0 ] ; \ 269 do \ 270 rm -rf "$$1"; \ 271 ln -s "$$2" "$$1"; \ 272 shift; shift; \ 273 done 274 cd ${DESTDIR}/usr/share/openssl/man; \ 275 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 276 while [ $$# -gt 0 ] ; \ 277 do \ 278 rm -rf "$$1"; \ 279 ln -s "$$2" "$$1"; \ 280 shift; shift; \ 281 done 282 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* . 283 cd ${DESTDIR}/usr/share/nls; \ 284 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ 285 while [ $$# -gt 0 ] ; \ 286 do \ 287 rm -rf "$$1"; \ 288 ln -s "$$2" "$$1"; \ 289 shift; shift; \ 290 done 291 292etc-examples: 293 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 294 ${BIN1} ${BIN2} nsmb.conf opieaccess \ 295 ${DESTDIR}/usr/share/examples/etc 296 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \ 297 DESTDIR=${DESTDIR}/usr/share/examples 298 299.include <bsd.prog.mk> 300