1 # from: @(#)Makefile 5.11 (Berkeley) 5/21/91
9 .if ${MK_SENDMAIL} != "no"
54 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64"
58 .if exists(${.CURDIR}/etc.${MACHINE}/ttys)
59 BIN1+= etc.${MACHINE}/ttys
60 .elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys)
61 BIN1+= etc.${MACHINE_ARCH}/ttys
62 .elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys)
63 BIN1+= etc.${MACHINE_CPUARCH}/ttys
65 .error etc.MACHINE/ttys missing
68 OPENBSMDIR= ${.CURDIR}/../contrib/openbsm
69 BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \
70 ${OPENBSMDIR}/etc/audit_event
71 BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \
72 ${OPENBSMDIR}/etc/audit_user
73 BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn
74 BSM_ETC_DIR= ${DESTDIR}/etc/security
76 # NB: keep these sorted by MK_* knobs
86 .if ${MK_BSNMP} != "no"
90 .if ${MK_FREEBSD_UPDATE} != "no"
91 BIN1+= freebsd-update.conf
98 .if ${MK_INETD} != "no"
102 .if ${MK_LOCATE} != "no"
103 BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc
106 .if ${MK_LPR} != "no"
107 BIN1+= hosts.lpd printcap
110 .if ${MK_MAIL} != "no"
111 BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc
114 .if ${MK_NTP} != "no"
118 .if ${MK_OPENSSH} != "no"
119 SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
120 ${.CURDIR}/../crypto/openssh/sshd_config \
121 ${.CURDIR}/../crypto/openssh/moduli
123 .if ${MK_OPENSSL} != "no"
124 SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
127 .if ${MK_NS_CACHING} != "no"
131 .if ${MK_PORTSNAP} != "no"
139 .if ${MK_TCSH} != "no"
140 BIN1+= csh.cshrc csh.login csh.logout
143 .if ${MK_WIRELESS} != "no"
147 # -rwxr-xr-x root:wheel, for the new cron root:wheel
148 BIN2= netstart pccard_ether rc.suspend rc.resume
150 MTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist
151 .if ${MK_SENDMAIL} != "no"
152 MTREE+= BSD.sendmail.dist
154 .if ${MK_BIND} != "no"
155 MTREE+= BIND.chroot.dist
156 .if ${MK_BIND_LIBS} != "no"
157 MTREE+= BIND.include.dist
160 .if ${MK_DEBUG_FILES} != "no"
161 MTREE+= BSD.debug.dist
166 .if ${MK_SENDMAIL} == "no"
167 ETCMAIL=mailer.conf aliases
169 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
170 mailertable.sample aliases
173 # Special top level files for FreeBSD
177 DESTDIR:= ${DESTDIR:C://*:/:g}
180 .if ${MK_MAN} != "no"
181 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb
185 ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
186 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
188 .include <bsd.endian.mk>
189 .if ${TARGET_ENDIANNESS} == "1234"
192 .elif ${TARGET_ENDIANNESS} == "4321"
201 METALOG.add?= cat -l >> ${METALOG}
205 .if !defined(DESTDIR)
206 @echo "set DESTDIR before running \"make ${.TARGET}\""
210 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
211 ${BIN1} ${DESTDIR}/etc; \
212 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
213 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
214 ${BIN2} ${DESTDIR}/etc; \
215 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
216 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
218 sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab
220 .if ${MK_TCSH} == "no"
221 sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
223 pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
224 ${DESTDIR}/etc/master.passwd
227 echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \
228 echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \
229 echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \
230 echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \
233 .if ${MK_BLUETOOTH} != "no"
234 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
236 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
237 ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
238 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
239 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
240 ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
241 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
242 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
243 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
244 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install
245 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \
246 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
247 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
248 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
249 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
250 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
251 .if ${MK_BIND_MTREE} != "no"
252 if [ ! -e ${DESTDIR}/etc/namedb ]; then \
253 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
256 .if ${MK_BIND_ETC} != "no"
257 ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install
259 .if ${MK_SENDMAIL} != "no"
260 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
262 .if ${MK_OPENSSH} != "no"
263 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
264 ${SSH} ${DESTDIR}/etc/ssh
266 .if ${MK_OPENSSL} != "no"
267 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
268 ${SSL} ${DESTDIR}/etc/ssl
270 .if ${MK_KERBEROS} != "no"
271 cd ${.CURDIR}/root; \
272 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
273 dot.k5login ${DESTDIR}/root/.k5login;
275 cd ${.CURDIR}/root; \
276 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
277 dot.profile ${DESTDIR}/root/.profile; \
278 rm -f ${DESTDIR}/.profile; \
279 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
280 .if ${MK_TCSH} != "no"
281 cd ${.CURDIR}/root; \
282 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
283 dot.cshrc ${DESTDIR}/root/.cshrc; \
284 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
285 dot.login ${DESTDIR}/root/.login; \
286 rm -f ${DESTDIR}/.cshrc; \
287 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
289 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
290 ${MTREE} ${DESTDIR}/etc/mtree
291 .if ${MK_PPP} != "no"
292 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
293 ${PPPCNF} ${DESTDIR}/etc/ppp
295 .if ${MK_MAIL} != "no"
296 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
297 ${ETCMAIL} ${DESTDIR}/etc/mail
298 if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
299 ! -f ${DESTDIR}/etc/aliases ]; then \
300 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
303 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
304 ${DESTDIR}/etc/dumpdates
305 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
306 ${DESTDIR}/var/db/locate.database
307 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
309 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
310 ${FREEBSD} ${DESTDIR}/
311 .if ${MK_BOOT} != "no"
312 .if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints)
313 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
314 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
315 ${DESTDIR}/boot/device.hints
318 .if ${MK_NIS} == "no"
319 sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \
320 ${DESTDIR}/etc/nsswitch.conf
325 MTREES= mtree/BSD.root.dist / \
326 mtree/BSD.var.dist /var \
327 mtree/BSD.usr.dist /usr \
328 mtree/BSD.include.dist /usr/include
329 .if ${MK_DEBUG_FILES} != "no"
330 MTREES+= mtree/BSD.debug.dist /usr/lib
332 .if ${MK_BIND_LIBS} != "no"
333 MTREES+= mtree/BIND.include.dist /usr/include
335 .if ${MK_BIND_MTREE} != "no"
336 MTREES+= mtree/BIND.chroot.dist /var/named
338 .if ${MK_GROFF} != "no"
339 MTREES+= mtree/BSD.groff.dist /usr
341 .if ${MK_SENDMAIL} != "no"
342 MTREES+= mtree/BSD.sendmail.dist /
344 .for mtree in ${LOCAL_MTREE}
345 MTREES+= ../${mtree} /
348 distrib-dirs: ${MTREES:N/*}
350 while test $$# -ge 2; do \
355 ${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \
357 ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
361 while test $$# -ge 2; do \
365 test "$$d" == "/" && d=""; \
368 ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K uname,gname | " \
369 "sed s#^\.#.$$d# | ${METALOG.add}" ; \
370 ${MTREE_CMD:N-W} -C -f $$m -K uname,gname | sed s#^\.#.$$d# | \
374 ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys
375 cd ${DESTDIR}/usr/share/man; \
376 for mandir in man*; do \
377 ${INSTALL_SYMLINK} ../$$mandir \
378 ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
379 ${INSTALL_SYMLINK} ../$$mandir \
380 ${DESTDIR}/usr/share/man/en.UTF-8/; \
382 cd ${DESTDIR}/usr/share/openssl/man; \
383 for mandir in man*; do \
384 ${INSTALL_SYMLINK} ../$$mandir \
385 ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \
387 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
388 while [ $$# -gt 0 ] ; do \
389 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \
390 ${INSTALL_SYMLINK} "$$2" \
391 "${DESTDIR}/usr/share/openssl/man/$$1"; \
394 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
395 while [ $$# -gt 0 ] ; do \
396 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
401 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
402 ${BIN1} ${BIN2} nsmb.conf opieaccess \
403 ${DESTDIR}/usr/share/examples/etc
404 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
405 DESTDIR=${DESTDIR}/usr/share/examples
407 .include <bsd.prog.mk>