1 # from: @(#)Makefile 5.11 (Berkeley) 5/21/91
6 .if ${MK_SENDMAIL} != "no"
11 crontab devd.conf devfs.conf \
12 ddb.conf dhclient.conf disktab fbtab \
13 ftpusers gettytab group \
14 hosts hosts.allow hosts.equiv \
15 inetd.conf libalias.conf login.access login.conf mac.conf motd \
16 netconfig network.subr networks newsyslog.conf nsswitch.conf \
17 phones profile protocols \
18 rc rc.bsdextended rc.firewall rc.initdiskless \
19 rc.sendmail rc.shutdown \
20 rc.subr remote rpc services shells \
21 sysctl.conf syslog.conf termcap.small \
22 etc.${MACHINE_ARCH}/ttys
24 OPENBSMDIR= ${.CURDIR}/../contrib/openbsm
25 BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \
26 ${OPENBSMDIR}/etc/audit_event
27 BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \
28 ${OPENBSMDIR}/etc/audit_user
29 BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn
30 BSM_ETC_DIR= ${DESTDIR}/etc/security
32 # NB: keep these sorted by MK_* knobs
42 .if ${MK_BSNMP} != "no"
46 .if ${MK_FREEBSD_UPDATE} != "no"
47 BIN1+= freebsd-update.conf
50 .if ${MK_LOCATE} != "no"
51 BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc
55 BIN1+= hosts.lpd printcap
58 .if ${MK_MAIL} != "no"
59 BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc
62 .if ${MK_MAN_UTILS} != "no"
63 BIN1+= ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config
70 .if ${MK_OPENSSH} != "no"
71 SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
72 ${.CURDIR}/../crypto/openssh/sshd_config \
73 ${.CURDIR}/../crypto/openssh/moduli
75 .if ${MK_OPENSSL} != "no"
76 SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
79 .if ${MK_NS_CACHING} != "no"
83 .if ${MK_PORTSNAP} != "no"
91 .if ${MK_TCSH} != "no"
92 BIN1+= csh.cshrc csh.login csh.logout
95 .if ${MK_WIRELESS} != "no"
99 # -rwxr-xr-x root:wheel, for the new cron root:wheel
100 BIN2= netstart pccard_ether rc.suspend rc.resume
102 MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
103 BSD.var.dist BSD.x11.dist BSD.x11-4.dist
104 .if ${MK_SENDMAIL} != "no"
105 MTREE+= BSD.sendmail.dist
107 .if ${MK_BIND} != "no"
108 MTREE+= BIND.chroot.dist
109 .if ${MK_BIND_LIBS} != "no"
110 MTREE+= BIND.include.dist
116 .if ${MK_SENDMAIL} == "no"
117 ETCMAIL=mailer.conf aliases
119 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
120 mailertable.sample aliases
123 # Special top level files for FreeBSD
127 .if ${MK_MAN} != "no"
128 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb
132 ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
133 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
135 .include <bsd.endian.mk>
136 .if ${TARGET_ENDIANNESS} == "1234"
139 .elif ${TARGET_ENDIANNESS} == "4321"
148 .if !defined(DESTDIR)
149 @echo "set DESTDIR before running \"make ${.TARGET}\""
153 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
154 ${BIN1} ${DESTDIR}/etc; \
155 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
156 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
157 ${BIN2} ${DESTDIR}/etc; \
158 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
159 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
161 sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab
163 .if ${MK_TCSH} == "no"
164 sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
166 pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
167 ${DESTDIR}/etc/master.passwd
168 .if ${MK_BLUETOOTH} != "no"
169 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
171 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
172 ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
173 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
174 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
175 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
176 ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
177 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
178 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
179 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install
180 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \
181 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
182 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
183 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
184 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
185 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
186 .if ${MK_BIND_MTREE} != "no"
187 @if [ ! -e ${DESTDIR}/etc/namedb ]; then \
189 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
192 .if ${MK_BIND_ETC} != "no"
193 ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install
195 .if ${MK_SENDMAIL} != "no"
196 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
198 .if ${MK_OPENSSH} != "no"
199 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
200 ${SSH} ${DESTDIR}/etc/ssh
202 .if ${MK_OPENSSL} != "no"
203 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
204 ${SSL} ${DESTDIR}/etc/ssl
206 .if ${MK_KERBEROS} != "no"
207 cd ${.CURDIR}/root; \
208 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
209 dot.k5login ${DESTDIR}/root/.k5login;
211 cd ${.CURDIR}/root; \
212 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
213 dot.profile ${DESTDIR}/root/.profile; \
214 rm -f ${DESTDIR}/.profile; \
215 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
216 .if ${MK_TCSH} != "no"
217 cd ${.CURDIR}/root; \
218 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
219 dot.cshrc ${DESTDIR}/root/.cshrc; \
220 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
221 dot.login ${DESTDIR}/root/.login; \
222 rm -f ${DESTDIR}/.cshrc; \
223 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
225 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
226 ${MTREE} ${DESTDIR}/etc/mtree
227 .if ${MK_PPP} != "no"
228 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
229 ${PPPCNF} ${DESTDIR}/etc/ppp
231 .if ${MK_MAIL} != "no"
232 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
233 ${ETCMAIL} ${DESTDIR}/etc/mail
234 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
235 ! -f ${DESTDIR}/etc/aliases ]; then \
237 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
240 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
241 ${DESTDIR}/etc/dumpdates
242 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
243 ${DESTDIR}/var/db/locate.database
244 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
246 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
247 ${FREEBSD} ${DESTDIR}/
248 .if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints)
249 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
250 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
251 ${DESTDIR}/boot/device.hints
255 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
256 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
257 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
258 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
259 -p ${DESTDIR}/usr/include
260 .if ${MK_BIND_LIBS} != "no"
261 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
262 -p ${DESTDIR}/usr/include
264 .if ${MK_BIND_MTREE} != "no"
265 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
266 -p ${DESTDIR}/var/named
268 .if ${MK_SENDMAIL} != "no"
269 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
271 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
272 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
273 cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* .
274 cd ${DESTDIR}/usr/share/man; \
275 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
276 while [ $$# -gt 0 ] ; \
282 cd ${DESTDIR}/usr/share/openssl/man; \
283 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
284 while [ $$# -gt 0 ] ; \
290 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
291 cd ${DESTDIR}/usr/share/nls; \
292 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
293 while [ $$# -gt 0 ] ; \
301 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
302 ${BIN1} ${BIN2} nsmb.conf opieaccess \
303 ${DESTDIR}/usr/share/examples/etc
304 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
305 DESTDIR=${DESTDIR}/usr/share/examples
307 .include <bsd.prog.mk>