1# from: @(#)Makefile 5.11 (Berkeley) 5/21/91 2# $FreeBSD$ 3 4.if !defined(NO_SENDMAIL) 5SUBDIR= sendmail 6.endif 7 8BIN1= amd.map apmd.conf auth.conf \ 9 crontab csh.cshrc csh.login csh.logout devd.conf devfs.conf \ 10 dhclient.conf disktab fbtab ftpusers gettytab group \ 11 hosts hosts.allow hosts.equiv hosts.lpd \ 12 inetd.conf login.access login.conf \ 13 mac.conf motd netconfig network.subr networks newsyslog.conf \ 14 pf.conf pf.os phones profile protocols \ 15 rc rc.bsdextended rc.firewall rc.firewall6 rc.sendmail rc.shutdown \ 16 rc.subr remote rpc services \ 17 shells sysctl.conf syslog.conf usbd.conf \ 18 etc.${MACHINE_ARCH}/ttys \ 19 ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \ 20 ${.CURDIR}/../usr.bin/mail/misc/mail.rc \ 21 ${.CURDIR}/../usr.bin/locate/locate/locate.rc 22.if !defined(NO_LPR) 23BIN1+= printcap 24.endif 25 26.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) 27.if !defined(NO_OPENSSH) 28SSH= ${.CURDIR}/../crypto/openssh/ssh_config \ 29 ${.CURDIR}/../crypto/openssh/sshd_config \ 30 ${.CURDIR}/../crypto/openssh/moduli 31.endif 32SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf 33.endif 34 35# -rwxr-xr-x root:wheel, for the new cron root:wheel 36BIN2= netstart pccard_ether rc.suspend rc.resume 37 38MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \ 39 BSD.var.dist BSD.x11.dist BSD.x11-4.dist 40.if !defined(NO_SENDMAIL) 41MTREE+= BSD.sendmail.dist 42.endif 43.if !defined(NO_BIND) 44MTREE+= BIND.chroot.dist 45.if defined(WITH_BIND_LIBS) 46MTREE+= BIND.include.dist 47.endif 48.endif 49 50.if !defined(NO_BIND_ETC) && !defined(NO_BIND) 51NAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \ 52 make-localhost 53.endif 54 55PPPCNF= ppp.conf 56 57.if defined(NO_SENDMAIL) 58ETCMAIL=mailer.conf aliases 59.else 60ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ 61 mailertable.sample aliases 62.endif 63 64# Special top level files for FreeBSD 65FREEBSD=COPYRIGHT 66 67afterinstall: 68.if !defined(NO_MAN) 69 cd ${.CURDIR}/../share/man; ${MAKE} makedb 70.endif 71 72distribute: 73 cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} 74 cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} 75 76.include <bsd.endian.mk> 77.if ${TARGET_ENDIANNESS} == "1234" 78CAP_MKDB_ENDIAN= -l 79PWD_MKDB_ENDIAN= -L 80.elif ${TARGET_ENDIANNESS} == "4321" 81CAP_MKDB_ENDIAN= -b 82PWD_MKDB_ENDIAN= -B 83.else 84CAP_MKDB_ENDIAN= 85.endif 86 87distribution: 88 cd ${.CURDIR}; \ 89 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 90 ${BIN1} ${DESTDIR}/etc; \ 91 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ 92 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ 93 ${BIN2} ${DESTDIR}/etc; \ 94 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 95 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \ 96 pwd_mkdb ${PWD_MKDB_ENDIAN} -p -d ${DESTDIR}/etc \ 97 ${DESTDIR}/etc/master.passwd 98 cd ${.CURDIR}/bluetooth; ${MAKE} install 99 cd ${.CURDIR}/defaults; ${MAKE} install 100 cd ${.CURDIR}/periodic; ${MAKE} install 101 cd ${.CURDIR}/rc.d; ${MAKE} install 102 cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall 103 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap 104 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt 105 cd ${.CURDIR}/pam.d; ${MAKE} install 106.if !defined(NO_I4B) 107 cd ${.CURDIR}/isdn; ${MAKE} install 108.endif 109.if !defined(NO_SENDMAIL) 110 cd ${.CURDIR}/sendmail; ${MAKE} distribution 111.endif 112.if !defined(NO_OPENSSL) 113.if !defined(NO_OPENSSH) 114 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 115 ${SSH} ${DESTDIR}/etc/ssh 116.endif 117 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 118 ${SSL} ${DESTDIR}/etc/ssl 119.endif 120.if !defined(NO_KERBEROS) 121 cd ${.CURDIR}/root; \ 122 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 123 dot.k5login ${DESTDIR}/root/.k5login; 124.endif 125 cd ${.CURDIR}/root; \ 126 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 127 dot.cshrc ${DESTDIR}/root/.cshrc; \ 128 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 129 dot.login ${DESTDIR}/root/.login; \ 130 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 131 dot.profile ${DESTDIR}/root/.profile; \ 132 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 133 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 134 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile 135 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 136 ${MTREE} ${DESTDIR}/etc/mtree 137.if !defined(NO_BIND) 138.if !defined(NO_BIND_ETC) 139 cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 140 ${NAMEDB} ${DESTDIR}/var/named/etc/namedb 141.endif 142.if !defined(NO_BIND_MTREE) 143 @if [ ! -e ${DESTDIR}/etc/namedb ]; then \ 144 set -x; \ 145 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ 146 fi 147.endif 148.endif 149 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 150 ${PPPCNF} ${DESTDIR}/etc/ppp 151 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 152 ${ETCMAIL} ${DESTDIR}/etc/mail 153 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ 154 ! -f ${DESTDIR}/etc/aliases ]; then \ 155 set -x; \ 156 ln -s mail/aliases ${DESTDIR}/etc/aliases; \ 157 fi 158 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ 159 ${DESTDIR}/etc/dumpdates 160 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ 161 ${DESTDIR}/var/db/locate.database 162 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ 163 ${DESTDIR}/var/crash 164 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 165 ${FREEBSD} ${DESTDIR}/ 166 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 167 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ 168 ${DESTDIR}/boot/device.hints 169 170distrib-dirs: 171 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ 172 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var 173 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr 174 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ 175 -p ${DESTDIR}/usr/include 176.if !defined(NO_BIND) 177.if defined(WITH_BIND_LIBS) 178 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ 179 -p ${DESTDIR}/usr/include 180.endif 181.if !defined(NO_BIND_MTREE) 182 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ 183 -p ${DESTDIR}/var/named 184.endif 185.endif 186.if !defined(NO_SENDMAIL) 187 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ 188.endif 189 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys 190 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . 191 cd ${DESTDIR}/usr/share/man; \ 192 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 193 while [ $$# -gt 0 ] ; \ 194 do \ 195 rm -rf "$$1"; \ 196 ln -s "$$2" "$$1"; \ 197 shift; shift; \ 198 done 199 cd ${DESTDIR}/usr/share/openssl/man; \ 200 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 201 while [ $$# -gt 0 ] ; \ 202 do \ 203 rm -rf "$$1"; \ 204 ln -s "$$2" "$$1"; \ 205 shift; shift; \ 206 done 207 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* . 208 cd ${DESTDIR}/usr/share/nls; \ 209 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ 210 while [ $$# -gt 0 ] ; \ 211 do \ 212 rm -rf "$$1"; \ 213 ln -s "$$2" "$$1"; \ 214 shift; shift; \ 215 done 216 217etc-examples: 218 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 219 ${BIN1} ${BIN2} nsmb.conf opieaccess \ 220 ${DESTDIR}/usr/share/examples/etc 221 cd ${.CURDIR}/defaults; ${MAKE} install \ 222 DESTDIR=${DESTDIR}/usr/share/examples 223 224.include <bsd.prog.mk> 225