1 # from: @(#)Makefile 5.11 (Berkeley) 5/21/91
6 .if ${MK_SENDMAIL} != "no"
11 crontab devd.conf devfs.conf \
12 ddb.conf dhclient.conf disktab fbtab \
13 ftpusers gettytab group \
14 hosts hosts.allow hosts.equiv \
15 inetd.conf libalias.conf login.access login.conf mac.conf motd \
16 netconfig network.subr networks newsyslog.conf nsswitch.conf \
17 phones profile protocols \
18 rc rc.bsdextended rc.firewall rc.initdiskless \
19 rc.sendmail rc.shutdown \
20 rc.subr remote rpc services shells \
21 sysctl.conf syslog.conf termcap.small
23 .if exists(${.CURDIR}/etc.${MACHINE}/ttys)
24 BIN1+= etc.${MACHINE}/ttys
25 .elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys)
26 BIN1+= etc.${MACHINE_ARCH}/ttys
27 .elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys)
28 BIN1+= etc.${MACHINE_CPUARCH}/ttys
30 .error etc.MACHINE/ttys missing
33 OPENBSMDIR= ${.CURDIR}/../contrib/openbsm
34 BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \
35 ${OPENBSMDIR}/etc/audit_event
36 BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \
37 ${OPENBSMDIR}/etc/audit_user
38 BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn
39 BSM_ETC_DIR= ${DESTDIR}/etc/security
41 # NB: keep these sorted by MK_* knobs
51 .if ${MK_BSNMP} != "no"
55 .if ${MK_FREEBSD_UPDATE} != "no"
56 BIN1+= freebsd-update.conf
59 .if ${MK_LOCATE} != "no"
60 BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc
64 BIN1+= hosts.lpd printcap
67 .if ${MK_MAIL} != "no"
68 BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc
71 .if ${MK_MAN_UTILS} != "no"
72 BIN1+= ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config
79 .if ${MK_OPENSSH} != "no"
80 SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
81 ${.CURDIR}/../crypto/openssh/sshd_config \
82 ${.CURDIR}/../crypto/openssh/moduli
84 .if ${MK_OPENSSL} != "no"
85 SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
88 .if ${MK_NS_CACHING} != "no"
92 .if ${MK_PORTSNAP} != "no"
100 .if ${MK_TCSH} != "no"
101 BIN1+= csh.cshrc csh.login csh.logout
104 .if ${MK_WIRELESS} != "no"
108 # -rwxr-xr-x root:wheel, for the new cron root:wheel
109 BIN2= netstart pccard_ether rc.suspend rc.resume
111 MTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist
112 .if ${MK_SENDMAIL} != "no"
113 MTREE+= BSD.sendmail.dist
115 .if ${MK_BIND} != "no"
116 MTREE+= BIND.chroot.dist
117 .if ${MK_BIND_LIBS} != "no"
118 MTREE+= BIND.include.dist
124 .if ${MK_SENDMAIL} == "no"
125 ETCMAIL=mailer.conf aliases
127 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
128 mailertable.sample aliases
131 # Special top level files for FreeBSD
135 .if ${MK_MAN} != "no"
136 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb
140 ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
141 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
143 .include <bsd.endian.mk>
144 .if ${TARGET_ENDIANNESS} == "1234"
147 .elif ${TARGET_ENDIANNESS} == "4321"
156 .if !defined(DESTDIR)
157 @echo "set DESTDIR before running \"make ${.TARGET}\""
161 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
162 ${BIN1} ${DESTDIR}/etc; \
163 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
164 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
165 ${BIN2} ${DESTDIR}/etc; \
166 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
167 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
169 sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab
171 .if ${MK_TCSH} == "no"
172 sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
174 pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
175 ${DESTDIR}/etc/master.passwd
176 .if ${MK_BLUETOOTH} != "no"
177 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
179 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
180 ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
181 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
182 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
183 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
184 ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
185 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
186 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
187 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install
188 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \
189 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
190 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
191 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
192 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
193 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
194 .if ${MK_BIND_MTREE} != "no"
195 @if [ ! -e ${DESTDIR}/etc/namedb ]; then \
197 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
200 .if ${MK_BIND_ETC} != "no"
201 ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install
203 .if ${MK_SENDMAIL} != "no"
204 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
206 .if ${MK_OPENSSH} != "no"
207 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
208 ${SSH} ${DESTDIR}/etc/ssh
210 .if ${MK_OPENSSL} != "no"
211 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
212 ${SSL} ${DESTDIR}/etc/ssl
214 .if ${MK_KERBEROS} != "no"
215 cd ${.CURDIR}/root; \
216 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
217 dot.k5login ${DESTDIR}/root/.k5login;
219 cd ${.CURDIR}/root; \
220 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
221 dot.profile ${DESTDIR}/root/.profile; \
222 rm -f ${DESTDIR}/.profile; \
223 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
224 .if ${MK_TCSH} != "no"
225 cd ${.CURDIR}/root; \
226 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
227 dot.cshrc ${DESTDIR}/root/.cshrc; \
228 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
229 dot.login ${DESTDIR}/root/.login; \
230 rm -f ${DESTDIR}/.cshrc; \
231 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
233 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
234 ${MTREE} ${DESTDIR}/etc/mtree
235 .if ${MK_PPP} != "no"
236 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
237 ${PPPCNF} ${DESTDIR}/etc/ppp
239 .if ${MK_MAIL} != "no"
240 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
241 ${ETCMAIL} ${DESTDIR}/etc/mail
242 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
243 ! -f ${DESTDIR}/etc/aliases ]; then \
245 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
248 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
249 ${DESTDIR}/etc/dumpdates
250 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
251 ${DESTDIR}/var/db/locate.database
252 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
254 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
255 ${FREEBSD} ${DESTDIR}/
256 .if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints)
257 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
258 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
259 ${DESTDIR}/boot/device.hints
263 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
264 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
265 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
266 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
267 -p ${DESTDIR}/usr/include
268 .if ${MK_BIND_LIBS} != "no"
269 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
270 -p ${DESTDIR}/usr/include
272 .if ${MK_BIND_MTREE} != "no"
273 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
274 -p ${DESTDIR}/var/named
276 .if ${MK_SENDMAIL} != "no"
277 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
279 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
280 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
281 cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* .
282 cd ${DESTDIR}/usr/share/man; \
283 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
284 while [ $$# -gt 0 ] ; \
290 cd ${DESTDIR}/usr/share/openssl/man; \
291 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
292 while [ $$# -gt 0 ] ; \
298 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
299 cd ${DESTDIR}/usr/share/nls; \
300 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
301 while [ $$# -gt 0 ] ; \
309 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
310 ${BIN1} ${BIN2} nsmb.conf opieaccess \
311 ${DESTDIR}/usr/share/examples/etc
312 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
313 DESTDIR=${DESTDIR}/usr/share/examples
315 .include <bsd.prog.mk>