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