1 # from: @(#)Makefile 5.11 (Berkeley) 5/21/91
6 .if ${MK_SENDMAIL} != "no"
53 .if exists(${.CURDIR}/etc.${MACHINE}/ttys)
54 BIN1+= etc.${MACHINE}/ttys
55 .elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys)
56 BIN1+= etc.${MACHINE_ARCH}/ttys
57 .elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys)
58 BIN1+= etc.${MACHINE_CPUARCH}/ttys
60 .error etc.MACHINE/ttys missing
63 OPENBSMDIR= ${.CURDIR}/../contrib/openbsm
64 BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \
65 ${OPENBSMDIR}/etc/audit_event
66 BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \
67 ${OPENBSMDIR}/etc/audit_user
68 BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn
69 BSM_ETC_DIR= ${DESTDIR}/etc/security
71 # NB: keep these sorted by MK_* knobs
81 .if ${MK_BSNMP} != "no"
85 .if ${MK_FREEBSD_UPDATE} != "no"
86 BIN1+= freebsd-update.conf
89 .if ${MK_LOCATE} != "no"
90 BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc
94 BIN1+= hosts.lpd printcap
97 .if ${MK_MAIL} != "no"
98 BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc
101 .if ${MK_NTP} != "no"
105 .if ${MK_OPENSSH} != "no"
106 SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
107 ${.CURDIR}/../crypto/openssh/sshd_config \
108 ${.CURDIR}/../crypto/openssh/moduli
110 .if ${MK_OPENSSL} != "no"
111 SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
114 .if ${MK_NS_CACHING} != "no"
118 .if ${MK_PORTSNAP} != "no"
126 .if ${MK_TCSH} != "no"
127 BIN1+= csh.cshrc csh.login csh.logout
130 .if ${MK_WIRELESS} != "no"
134 # -rwxr-xr-x root:wheel, for the new cron root:wheel
135 BIN2= netstart pccard_ether rc.suspend rc.resume
137 MTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist
138 .if ${MK_SENDMAIL} != "no"
139 MTREE+= BSD.sendmail.dist
141 .if ${MK_BIND} != "no"
142 MTREE+= BIND.chroot.dist
143 .if ${MK_BIND_LIBS} != "no"
144 MTREE+= BIND.include.dist
147 .if ${MK_DEBUG_FILES} != "no"
148 MTREE+= BSD.debug.dist
153 .if ${MK_SENDMAIL} == "no"
154 ETCMAIL=mailer.conf aliases
156 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
157 mailertable.sample aliases
160 # Special top level files for FreeBSD
164 DESTDIR:= ${DESTDIR:C://*:/:g}
167 .if ${MK_MAN} != "no"
168 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb
172 ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
173 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
175 .include <bsd.endian.mk>
176 .if ${TARGET_ENDIANNESS} == "1234"
179 .elif ${TARGET_ENDIANNESS} == "4321"
188 METALOG.add?= cat -l >> ${METALOG}
192 .if !defined(DESTDIR)
193 @echo "set DESTDIR before running \"make ${.TARGET}\""
197 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
198 ${BIN1} ${DESTDIR}/etc; \
199 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
200 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
201 ${BIN2} ${DESTDIR}/etc; \
202 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
203 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
205 sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab
207 .if ${MK_TCSH} == "no"
208 sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
210 pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
211 ${DESTDIR}/etc/master.passwd
214 echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \
215 echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \
216 echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \
217 echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \
220 .if ${MK_ATF} != "no"
221 ${_+_}cd ${.CURDIR}/atf; ${MAKE} install
223 .if ${MK_BLUETOOTH} != "no"
224 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
226 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
227 ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
228 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
229 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
230 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
231 ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
232 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
233 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
234 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install
235 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \
236 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
237 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
238 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
239 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
240 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
241 .if ${MK_BIND_MTREE} != "no"
242 if [ ! -e ${DESTDIR}/etc/namedb ]; then \
243 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
246 .if ${MK_BIND_ETC} != "no"
247 ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install
249 .if ${MK_SENDMAIL} != "no"
250 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
252 .if ${MK_OPENSSH} != "no"
253 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
254 ${SSH} ${DESTDIR}/etc/ssh
256 .if ${MK_OPENSSL} != "no"
257 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
258 ${SSL} ${DESTDIR}/etc/ssl
260 .if ${MK_KERBEROS} != "no"
261 cd ${.CURDIR}/root; \
262 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
263 dot.k5login ${DESTDIR}/root/.k5login;
265 cd ${.CURDIR}/root; \
266 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
267 dot.profile ${DESTDIR}/root/.profile; \
268 rm -f ${DESTDIR}/.profile; \
269 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
270 .if ${MK_TCSH} != "no"
271 cd ${.CURDIR}/root; \
272 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
273 dot.cshrc ${DESTDIR}/root/.cshrc; \
274 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
275 dot.login ${DESTDIR}/root/.login; \
276 rm -f ${DESTDIR}/.cshrc; \
277 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
279 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
280 ${MTREE} ${DESTDIR}/etc/mtree
281 .if ${MK_PPP} != "no"
282 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
283 ${PPPCNF} ${DESTDIR}/etc/ppp
285 .if ${MK_MAIL} != "no"
286 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
287 ${ETCMAIL} ${DESTDIR}/etc/mail
288 if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
289 ! -f ${DESTDIR}/etc/aliases ]; then \
290 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
293 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
294 ${DESTDIR}/etc/dumpdates
295 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
296 ${DESTDIR}/var/db/locate.database
297 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
299 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
300 ${FREEBSD} ${DESTDIR}/
301 .if ${MK_BOOT} != "no"
302 .if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints)
303 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
304 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
305 ${DESTDIR}/boot/device.hints
308 .if ${MK_NIS} == "no"
309 sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \
310 ${DESTDIR}/etc/nsswitch.conf
315 MTREES= mtree/BSD.root.dist / \
316 mtree/BSD.var.dist /var \
317 mtree/BSD.usr.dist /usr \
318 mtree/BSD.include.dist /usr/include
319 .if ${MK_DEBUG_FILES} != "no"
320 MTREES+= mtree/BSD.debug.dist /usr/lib
322 .if ${MK_BIND_LIBS} != "no"
323 MTREES+= mtree/BIND.include.dist /usr/include
325 .if ${MK_BIND_MTREE} != "no"
326 MTREES+= mtree/BIND.chroot.dist /var/named
328 .if ${MK_GROFF} != "no"
329 MTREES+= mtree/BSD.groff.dist /usr
331 .if ${MK_SENDMAIL} != "no"
332 MTREES+= mtree/BSD.sendmail.dist /
334 .for mtree in ${LOCAL_MTREE}
335 MTREES+= ../${mtree} /
338 distrib-dirs: ${MTREES:N/*}
340 while test $$# -ge 2; do \
345 ${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \
347 ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
351 while test $$# -ge 2; do \
355 test "$$d" == "/" && d=""; \
358 ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K uname,gname | " \
359 "sed s#^\.#.$$d# | ${METALOG.add}" ; \
360 ${MTREE_CMD:N-W} -C -f $$m -K uname,gname | sed s#^\.#.$$d# | \
364 ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys
365 cd ${DESTDIR}/usr/share/man; \
366 for mandir in man*; do \
367 ${INSTALL_SYMLINK} ../$$mandir \
368 ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
369 ${INSTALL_SYMLINK} ../$$mandir \
370 ${DESTDIR}/usr/share/man/en.UTF-8/; \
372 cd ${DESTDIR}/usr/share/openssl/man; \
373 for mandir in man*; do \
374 ${INSTALL_SYMLINK} ../$$mandir \
375 ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \
377 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
378 while [ $$# -gt 0 ] ; do \
379 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \
380 ${INSTALL_SYMLINK} "$$2" \
381 "${DESTDIR}/usr/share/openssl/man/$$1"; \
384 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
385 while [ $$# -gt 0 ] ; do \
386 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
391 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
392 ${BIN1} ${BIN2} nsmb.conf opieaccess \
393 ${DESTDIR}/usr/share/examples/etc
394 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
395 DESTDIR=${DESTDIR}/usr/share/examples
397 .include <bsd.prog.mk>