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 DESTDIR:= ${DESTDIR:C://*:/:g}
163 .if ${MK_MAN} != "no"
164 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb
168 ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
169 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
171 .include <bsd.endian.mk>
172 .if ${TARGET_ENDIANNESS} == "1234"
175 .elif ${TARGET_ENDIANNESS} == "4321"
184 METALOG.add?= cat -l >> ${METALOG}
188 .if !defined(DESTDIR)
189 @echo "set DESTDIR before running \"make ${.TARGET}\""
193 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
194 ${BIN1} ${DESTDIR}/etc; \
195 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
196 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
197 ${BIN2} ${DESTDIR}/etc; \
198 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
199 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
201 sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab
203 .if ${MK_TCSH} == "no"
204 sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
206 pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
207 ${DESTDIR}/etc/master.passwd
210 echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \
211 echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \
212 echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \
213 echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \
216 .if ${MK_BLUETOOTH} != "no"
217 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
219 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
220 ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
221 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
222 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
223 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
224 ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
225 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
226 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
227 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install
228 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \
229 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
230 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
231 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
232 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
233 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
234 .if ${MK_BIND_MTREE} != "no"
235 if [ ! -e ${DESTDIR}/etc/namedb ]; then \
236 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
239 .if ${MK_BIND_ETC} != "no"
240 ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install
242 .if ${MK_SENDMAIL} != "no"
243 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
245 .if ${MK_OPENSSH} != "no"
246 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
247 ${SSH} ${DESTDIR}/etc/ssh
249 .if ${MK_OPENSSL} != "no"
250 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
251 ${SSL} ${DESTDIR}/etc/ssl
253 .if ${MK_KERBEROS} != "no"
254 cd ${.CURDIR}/root; \
255 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
256 dot.k5login ${DESTDIR}/root/.k5login;
258 cd ${.CURDIR}/root; \
259 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
260 dot.profile ${DESTDIR}/root/.profile; \
261 rm -f ${DESTDIR}/.profile; \
262 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
263 .if ${MK_TCSH} != "no"
264 cd ${.CURDIR}/root; \
265 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
266 dot.cshrc ${DESTDIR}/root/.cshrc; \
267 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
268 dot.login ${DESTDIR}/root/.login; \
269 rm -f ${DESTDIR}/.cshrc; \
270 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
272 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
273 ${MTREE} ${DESTDIR}/etc/mtree
274 .if ${MK_PPP} != "no"
275 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
276 ${PPPCNF} ${DESTDIR}/etc/ppp
278 .if ${MK_MAIL} != "no"
279 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
280 ${ETCMAIL} ${DESTDIR}/etc/mail
281 if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
282 ! -f ${DESTDIR}/etc/aliases ]; then \
283 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
286 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
287 ${DESTDIR}/etc/dumpdates
288 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
289 ${DESTDIR}/var/db/locate.database
290 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
292 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
293 ${FREEBSD} ${DESTDIR}/
294 .if ${MK_BOOT} != "no"
295 .if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints)
296 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
297 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
298 ${DESTDIR}/boot/device.hints
301 .if ${MK_NIS} == "no"
302 sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \
303 ${DESTDIR}/etc/nsswitch.conf
308 MTREES= mtree/BSD.root.dist / \
309 mtree/BSD.var.dist /var \
310 mtree/BSD.usr.dist /usr \
311 mtree/BSD.include.dist /usr/include
312 .if ${MK_BIND_LIBS} != "no"
313 MTREES+= mtree/BIND.include.dist /usr/include
315 .if ${MK_BIND_MTREE} != "no"
316 MTREES+= mtree/BIND.chroot.dist /var/named
318 .if ${MK_GROFF} != "no"
319 MTREES+= mtree/BSD.groff.dist /usr
321 .if ${MK_SENDMAIL} != "no"
322 MTREES+= mtree/BSD.sendmail.dist /
324 .for mtree in ${LOCAL_MTREE}
325 MTREES+= ../${mtree} /
328 distrib-dirs: ${MTREES:N/*}
330 while test $$# -ge 2; do \
335 ${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \
337 ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
341 while test $$# -ge 2; do \
345 test "$$d" == "/" && d=""; \
348 ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K uname,gname | " \
349 "sed s#^\.#.$$d# | ${METALOG.add}" ; \
350 ${MTREE_CMD:N-W} -C -f $$m -K uname,gname | sed s#^\.#.$$d# | \
354 ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys
355 cd ${DESTDIR}/usr/share/man; \
356 for mandir in man*; do \
357 ${INSTALL_SYMLINK} ../$$mandir \
358 ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
359 ${INSTALL_SYMLINK} ../$$mandir \
360 ${DESTDIR}/usr/share/man/en.UTF-8/; \
362 cd ${DESTDIR}/usr/share/openssl/man; \
363 for mandir in man*; do \
364 ${INSTALL_SYMLINK} ../$$mandir \
365 ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \
367 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
368 while [ $$# -gt 0 ] ; do \
369 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \
370 ${INSTALL_SYMLINK} "$$2" \
371 "${DESTDIR}/usr/share/openssl/man/$$1"; \
374 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
375 while [ $$# -gt 0 ] ; do \
376 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
381 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
382 ${BIN1} ${BIN2} nsmb.conf opieaccess \
383 ${DESTDIR}/usr/share/examples/etc
384 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
385 DESTDIR=${DESTDIR}/usr/share/examples
387 .include <bsd.prog.mk>