1 # from: @(#)Makefile 5.11 (Berkeley) 5/21/91
6 .if ${MK_SENDMAIL} != "no"
52 .if exists(${.CURDIR}/etc.${MACHINE}/ttys)
53 BIN1+= etc.${MACHINE}/ttys
54 .elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys)
55 BIN1+= etc.${MACHINE_ARCH}/ttys
56 .elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys)
57 BIN1+= etc.${MACHINE_CPUARCH}/ttys
59 .error etc.MACHINE/ttys missing
62 OPENBSMDIR= ${.CURDIR}/../contrib/openbsm
63 BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \
64 ${OPENBSMDIR}/etc/audit_event
65 BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \
66 ${OPENBSMDIR}/etc/audit_user
67 BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn
68 BSM_ETC_DIR= ${DESTDIR}/etc/security
70 # NB: keep these sorted by MK_* knobs
80 .if ${MK_BSNMP} != "no"
84 .if ${MK_FREEBSD_UPDATE} != "no"
85 BIN1+= freebsd-update.conf
88 .if ${MK_LOCATE} != "no"
89 BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc
93 BIN1+= hosts.lpd printcap
96 .if ${MK_MAIL} != "no"
97 BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc
100 .if ${MK_NTP} != "no"
104 .if ${MK_OPENSSH} != "no"
105 SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
106 ${.CURDIR}/../crypto/openssh/sshd_config \
107 ${.CURDIR}/../crypto/openssh/moduli
109 .if ${MK_OPENSSL} != "no"
110 SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
113 .if ${MK_NS_CACHING} != "no"
117 .if ${MK_PORTSNAP} != "no"
125 .if ${MK_TCSH} != "no"
126 BIN1+= csh.cshrc csh.login csh.logout
129 .if ${MK_WIRELESS} != "no"
133 # -rwxr-xr-x root:wheel, for the new cron root:wheel
134 BIN2= netstart pccard_ether rc.suspend rc.resume
136 MTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist
137 .if ${MK_SENDMAIL} != "no"
138 MTREE+= BSD.sendmail.dist
140 .if ${MK_BIND} != "no"
141 MTREE+= BIND.chroot.dist
142 .if ${MK_BIND_LIBS} != "no"
143 MTREE+= BIND.include.dist
149 .if ${MK_SENDMAIL} == "no"
150 ETCMAIL=mailer.conf aliases
152 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
153 mailertable.sample aliases
156 # Special top level files for FreeBSD
160 .if ${MK_MAN} != "no"
161 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb
165 ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
166 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
168 .include <bsd.endian.mk>
169 .if ${TARGET_ENDIANNESS} == "1234"
172 .elif ${TARGET_ENDIANNESS} == "4321"
181 .if !defined(DESTDIR)
182 @echo "set DESTDIR before running \"make ${.TARGET}\""
186 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
187 ${BIN1} ${DESTDIR}/etc; \
188 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
189 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
190 ${BIN2} ${DESTDIR}/etc; \
191 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
192 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
194 sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab
196 .if ${MK_TCSH} == "no"
197 sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
199 pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
200 ${DESTDIR}/etc/master.passwd
201 .if ${MK_BLUETOOTH} != "no"
202 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
204 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
205 ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
206 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
207 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
208 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
209 ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
210 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
211 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
212 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install
213 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \
214 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
215 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
216 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
217 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
218 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
219 .if ${MK_BIND_MTREE} != "no"
220 if [ ! -e ${DESTDIR}/etc/namedb ]; then \
221 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
224 .if ${MK_BIND_ETC} != "no"
225 ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install
227 .if ${MK_SENDMAIL} != "no"
228 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
230 .if ${MK_OPENSSH} != "no"
231 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
232 ${SSH} ${DESTDIR}/etc/ssh
234 .if ${MK_OPENSSL} != "no"
235 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
236 ${SSL} ${DESTDIR}/etc/ssl
238 .if ${MK_KERBEROS} != "no"
239 cd ${.CURDIR}/root; \
240 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
241 dot.k5login ${DESTDIR}/root/.k5login;
243 cd ${.CURDIR}/root; \
244 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
245 dot.profile ${DESTDIR}/root/.profile; \
246 rm -f ${DESTDIR}/.profile; \
247 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
248 .if ${MK_TCSH} != "no"
249 cd ${.CURDIR}/root; \
250 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
251 dot.cshrc ${DESTDIR}/root/.cshrc; \
252 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
253 dot.login ${DESTDIR}/root/.login; \
254 rm -f ${DESTDIR}/.cshrc; \
255 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
257 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
258 ${MTREE} ${DESTDIR}/etc/mtree
259 .if ${MK_PPP} != "no"
260 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
261 ${PPPCNF} ${DESTDIR}/etc/ppp
263 .if ${MK_MAIL} != "no"
264 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
265 ${ETCMAIL} ${DESTDIR}/etc/mail
266 if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
267 ! -f ${DESTDIR}/etc/aliases ]; then \
268 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
271 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
272 ${DESTDIR}/etc/dumpdates
273 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
274 ${DESTDIR}/var/db/locate.database
275 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
277 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
278 ${FREEBSD} ${DESTDIR}/
279 .if ${MK_BOOT} != "no"
280 .if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints)
281 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
282 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
283 ${DESTDIR}/boot/device.hints
286 .if ${MK_NIS} == "no"
287 sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \
288 ${DESTDIR}/etc/nsswitch.conf
293 MTREES= mtree/BSD.root.dist / \
294 mtree/BSD.var.dist /var \
295 mtree/BSD.usr.dist /usr \
296 mtree/BSD.include.dist /usr/include
297 .if ${MK_BIND_LIBS} != "no"
298 MTREES+= mtree/BIND.include.dist /usr/include
300 .if ${MK_BIND_MTREE} != "no"
301 MTREES+= mtree/BIND.chroot.dist /var/named
303 .if ${MK_GROFF} != "no"
304 MTREES+= mtree/BSD.groff.dist /usr
306 .if ${MK_SENDMAIL} != "no"
307 MTREES+= mtree/BSD.sendmail.dist /
309 .for mtree in ${LOCAL_MTREE}
310 MTREES+= ../${mtree} /
315 while test $$# -ge 2; do \
320 ${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \
322 ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
324 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
325 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
326 cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* .
327 cd ${DESTDIR}/usr/share/man; \
328 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
329 while [ $$# -gt 0 ] ; \
335 cd ${DESTDIR}/usr/share/openssl/man; \
336 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
337 while [ $$# -gt 0 ] ; \
343 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
344 cd ${DESTDIR}/usr/share/nls; \
345 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
346 while [ $$# -gt 0 ] ; \
354 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
355 ${BIN1} ${BIN2} nsmb.conf opieaccess \
356 ${DESTDIR}/usr/share/examples/etc
357 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
358 DESTDIR=${DESTDIR}/usr/share/examples
360 .include <bsd.prog.mk>