1 # from: @(#)Makefile 5.11 (Berkeley) 5/21/91
6 .if ${MK_SENDMAIL} != "no"
53 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64"
57 .if exists(${.CURDIR}/etc.${MACHINE}/ttys)
58 BIN1+= etc.${MACHINE}/ttys
59 .elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys)
60 BIN1+= etc.${MACHINE_ARCH}/ttys
61 .elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys)
62 BIN1+= etc.${MACHINE_CPUARCH}/ttys
64 .error etc.MACHINE/ttys missing
67 OPENBSMDIR= ${.CURDIR}/../contrib/openbsm
68 BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \
69 ${OPENBSMDIR}/etc/audit_event
70 BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \
71 ${OPENBSMDIR}/etc/audit_user
72 BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn
73 BSM_ETC_DIR= ${DESTDIR}/etc/security
75 # NB: keep these sorted by MK_* knobs
85 .if ${MK_BSNMP} != "no"
89 .if ${MK_FREEBSD_UPDATE} != "no"
90 BIN1+= freebsd-update.conf
93 .if ${MK_LOCATE} != "no"
94 BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc
98 BIN1+= hosts.lpd printcap
101 .if ${MK_MAIL} != "no"
102 BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc
105 .if ${MK_NTP} != "no"
109 .if ${MK_OPENSSH} != "no"
110 SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
111 ${.CURDIR}/../crypto/openssh/sshd_config \
112 ${.CURDIR}/../crypto/openssh/moduli
114 .if ${MK_OPENSSL} != "no"
115 SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
118 .if ${MK_NS_CACHING} != "no"
122 .if ${MK_PORTSNAP} != "no"
130 .if ${MK_TCSH} != "no"
131 BIN1+= csh.cshrc csh.login csh.logout
134 .if ${MK_WIRELESS} != "no"
138 # -rwxr-xr-x root:wheel, for the new cron root:wheel
139 BIN2= netstart pccard_ether rc.suspend rc.resume
141 MTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist
142 .if ${MK_SENDMAIL} != "no"
143 MTREE+= BSD.sendmail.dist
145 .if ${MK_BIND} != "no"
146 MTREE+= BIND.chroot.dist
147 .if ${MK_BIND_LIBS} != "no"
148 MTREE+= BIND.include.dist
151 .if ${MK_DEBUG_FILES} != "no"
152 MTREE+= BSD.debug.dist
157 .if ${MK_SENDMAIL} == "no"
158 ETCMAIL=mailer.conf aliases
160 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
161 mailertable.sample aliases
164 # Special top level files for FreeBSD
168 DESTDIR:= ${DESTDIR:C://*:/:g}
171 .if ${MK_MAN} != "no"
172 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb
176 ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
177 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
179 .include <bsd.endian.mk>
180 .if ${TARGET_ENDIANNESS} == "1234"
183 .elif ${TARGET_ENDIANNESS} == "4321"
192 METALOG.add?= cat -l >> ${METALOG}
196 .if !defined(DESTDIR)
197 @echo "set DESTDIR before running \"make ${.TARGET}\""
201 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
202 ${BIN1} ${DESTDIR}/etc; \
203 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
204 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
205 ${BIN2} ${DESTDIR}/etc; \
206 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
207 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
209 sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab
211 .if ${MK_TCSH} == "no"
212 sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
214 pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
215 ${DESTDIR}/etc/master.passwd
218 echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \
219 echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \
220 echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \
221 echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \
224 .if ${MK_BLUETOOTH} != "no"
225 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
227 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
228 ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
229 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
230 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
231 ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
232 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
233 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
234 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
235 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install
236 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \
237 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
238 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
239 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
240 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
241 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
242 .if ${MK_BIND_MTREE} != "no"
243 if [ ! -e ${DESTDIR}/etc/namedb ]; then \
244 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
247 .if ${MK_BIND_ETC} != "no"
248 ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install
250 .if ${MK_SENDMAIL} != "no"
251 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
253 .if ${MK_OPENSSH} != "no"
254 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
255 ${SSH} ${DESTDIR}/etc/ssh
257 .if ${MK_OPENSSL} != "no"
258 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
259 ${SSL} ${DESTDIR}/etc/ssl
261 .if ${MK_KERBEROS} != "no"
262 cd ${.CURDIR}/root; \
263 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
264 dot.k5login ${DESTDIR}/root/.k5login;
266 cd ${.CURDIR}/root; \
267 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
268 dot.profile ${DESTDIR}/root/.profile; \
269 rm -f ${DESTDIR}/.profile; \
270 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
271 .if ${MK_TCSH} != "no"
272 cd ${.CURDIR}/root; \
273 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
274 dot.cshrc ${DESTDIR}/root/.cshrc; \
275 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
276 dot.login ${DESTDIR}/root/.login; \
277 rm -f ${DESTDIR}/.cshrc; \
278 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
280 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
281 ${MTREE} ${DESTDIR}/etc/mtree
282 .if ${MK_PPP} != "no"
283 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
284 ${PPPCNF} ${DESTDIR}/etc/ppp
286 .if ${MK_MAIL} != "no"
287 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
288 ${ETCMAIL} ${DESTDIR}/etc/mail
289 if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
290 ! -f ${DESTDIR}/etc/aliases ]; then \
291 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
294 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
295 ${DESTDIR}/etc/dumpdates
296 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
297 ${DESTDIR}/var/db/locate.database
298 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
300 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
301 ${FREEBSD} ${DESTDIR}/
302 .if ${MK_BOOT} != "no"
303 .if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints)
304 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
305 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
306 ${DESTDIR}/boot/device.hints
309 .if ${MK_NIS} == "no"
310 sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \
311 ${DESTDIR}/etc/nsswitch.conf
316 MTREES= mtree/BSD.root.dist / \
317 mtree/BSD.var.dist /var \
318 mtree/BSD.usr.dist /usr \
319 mtree/BSD.include.dist /usr/include
320 .if ${MK_DEBUG_FILES} != "no"
321 MTREES+= mtree/BSD.debug.dist /usr/lib
323 .if ${MK_BIND_LIBS} != "no"
324 MTREES+= mtree/BIND.include.dist /usr/include
326 .if ${MK_BIND_MTREE} != "no"
327 MTREES+= mtree/BIND.chroot.dist /var/named
329 .if ${MK_GROFF} != "no"
330 MTREES+= mtree/BSD.groff.dist /usr
332 .if ${MK_SENDMAIL} != "no"
333 MTREES+= mtree/BSD.sendmail.dist /
335 .for mtree in ${LOCAL_MTREE}
336 MTREES+= ../${mtree} /
339 distrib-dirs: ${MTREES:N/*}
341 while test $$# -ge 2; do \
346 ${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \
348 ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
352 while test $$# -ge 2; do \
356 test "$$d" == "/" && d=""; \
359 ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K uname,gname | " \
360 "sed s#^\.#.$$d# | ${METALOG.add}" ; \
361 ${MTREE_CMD:N-W} -C -f $$m -K uname,gname | sed s#^\.#.$$d# | \
365 ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys
366 cd ${DESTDIR}/usr/share/man; \
367 for mandir in man*; do \
368 ${INSTALL_SYMLINK} ../$$mandir \
369 ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
370 ${INSTALL_SYMLINK} ../$$mandir \
371 ${DESTDIR}/usr/share/man/en.UTF-8/; \
373 cd ${DESTDIR}/usr/share/openssl/man; \
374 for mandir in man*; do \
375 ${INSTALL_SYMLINK} ../$$mandir \
376 ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \
378 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
379 while [ $$# -gt 0 ] ; do \
380 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \
381 ${INSTALL_SYMLINK} "$$2" \
382 "${DESTDIR}/usr/share/openssl/man/$$1"; \
385 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
386 while [ $$# -gt 0 ] ; do \
387 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
392 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
393 ${BIN1} ${BIN2} nsmb.conf opieaccess \
394 ${DESTDIR}/usr/share/examples/etc
395 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
396 DESTDIR=${DESTDIR}/usr/share/examples
398 .include <bsd.prog.mk>