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 \
22 etc.${MACHINE_ARCH}/ttys
24 OPENBSMDIR= ${.CURDIR}/../contrib/openbsm
25 BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \
26 ${OPENBSMDIR}/etc/audit_event
27 BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \
28 ${OPENBSMDIR}/etc/audit_user
29 BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn
30 BSM_ETC_DIR= ${DESTDIR}/etc/security
32 # NB: keep these sorted by MK_* knobs
42 .if ${MK_BSNMP} != "no"
46 .if ${MK_FREEBSD_UPDATE} != "no"
47 BIN1+= freebsd-update.conf
50 .if ${MK_LOCATE} != "no"
51 BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc
55 BIN1+= hosts.lpd printcap
58 .if ${MK_MAIL} != "no"
59 BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc
62 .if ${MK_MAN_UTILS} != "no"
63 BIN1+= ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config
70 .if ${MK_OPENSSH} != "no"
71 SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
72 ${.CURDIR}/../crypto/openssh/sshd_config \
73 ${.CURDIR}/../crypto/openssh/moduli
75 .if ${MK_OPENSSL} != "no"
76 SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
79 .if ${MK_NS_CACHING} != "no"
83 .if ${MK_PORTSNAP} != "no"
91 .if ${MK_TCSH} != "no"
92 BIN1+= csh.cshrc csh.login csh.logout
95 .if ${MK_WIRELESS} != "no"
99 # -rwxr-xr-x root:wheel, for the new cron root:wheel
100 BIN2= netstart pccard_ether rc.suspend rc.resume
102 MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
103 BSD.var.dist BSD.x11.dist BSD.x11-4.dist
104 .if ${MK_SENDMAIL} != "no"
105 MTREE+= BSD.sendmail.dist
107 .if ${MK_BIND} != "no"
108 MTREE+= BIND.chroot.dist
109 .if ${MK_BIND_LIBS} != "no"
110 MTREE+= BIND.include.dist
116 .if ${MK_SENDMAIL} == "no"
117 ETCMAIL=mailer.conf aliases
119 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
120 mailertable.sample aliases
123 # Special top level files for FreeBSD
127 .if ${MK_MAN} != "no"
128 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb
132 ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
133 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
135 .include <bsd.endian.mk>
136 .if ${TARGET_ENDIANNESS} == "1234"
139 .elif ${TARGET_ENDIANNESS} == "4321"
148 .if !defined(DESTDIR)
149 @echo "set DESTDIR before running \"make ${.TARGET}\""
153 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
154 ${BIN1} ${DESTDIR}/etc; \
155 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
156 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
157 ${BIN2} ${DESTDIR}/etc; \
158 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
159 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
161 sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab
163 .if ${MK_TCSH} == "no"
164 sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
166 pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
167 ${DESTDIR}/etc/master.passwd
168 .if ${MK_BLUETOOTH} != "no"
169 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
171 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
172 ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
173 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
174 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
175 ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
176 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
177 ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
178 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
179 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
180 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install
181 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \
182 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
183 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
184 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
185 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
186 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
187 .if ${MK_BIND_MTREE} != "no"
188 if [ ! -e ${DESTDIR}/etc/namedb ]; then \
189 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
192 .if ${MK_BIND_ETC} != "no"
193 ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install
195 .if ${MK_SENDMAIL} != "no"
196 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
198 .if ${MK_OPENSSH} != "no"
199 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
200 ${SSH} ${DESTDIR}/etc/ssh
202 .if ${MK_OPENSSL} != "no"
203 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
204 ${SSL} ${DESTDIR}/etc/ssl
206 .if ${MK_KERBEROS} != "no"
207 cd ${.CURDIR}/root; \
208 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
209 dot.k5login ${DESTDIR}/root/.k5login;
211 cd ${.CURDIR}/root; \
212 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
213 dot.profile ${DESTDIR}/root/.profile; \
214 rm -f ${DESTDIR}/.profile; \
215 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
216 .if ${MK_TCSH} != "no"
217 cd ${.CURDIR}/root; \
218 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
219 dot.cshrc ${DESTDIR}/root/.cshrc; \
220 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
221 dot.login ${DESTDIR}/root/.login; \
222 rm -f ${DESTDIR}/.cshrc; \
223 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
225 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
226 ${MTREE} ${DESTDIR}/etc/mtree
227 .if ${MK_PPP} != "no"
228 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
229 ${PPPCNF} ${DESTDIR}/etc/ppp
231 .if ${MK_MAIL} != "no"
232 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
233 ${ETCMAIL} ${DESTDIR}/etc/mail
234 if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
235 ! -f ${DESTDIR}/etc/aliases ]; then \
236 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
239 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
240 ${DESTDIR}/etc/dumpdates
241 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
242 ${DESTDIR}/var/db/locate.database
243 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
245 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
246 ${FREEBSD} ${DESTDIR}/
247 .if ${MK_BOOT} != "no"
248 .if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints)
249 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
250 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
251 ${DESTDIR}/boot/device.hints
254 .if ${MK_NIS} == "no"
255 sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \
256 ${DESTDIR}/etc/nsswitch.conf
260 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
261 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
262 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
263 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
264 -p ${DESTDIR}/usr/include
265 .if ${MK_BIND_LIBS} != "no"
266 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
267 -p ${DESTDIR}/usr/include
269 .if ${MK_BIND_MTREE} != "no"
270 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
271 -p ${DESTDIR}/var/named
273 .if ${MK_SENDMAIL} != "no"
274 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
276 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
277 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
278 cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* .
279 cd ${DESTDIR}/usr/share/man; \
280 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
281 while [ $$# -gt 0 ] ; \
287 cd ${DESTDIR}/usr/share/openssl/man; \
288 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
289 while [ $$# -gt 0 ] ; \
295 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
296 cd ${DESTDIR}/usr/share/nls; \
297 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
298 while [ $$# -gt 0 ] ; \
306 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
307 ${BIN1} ${BIN2} nsmb.conf opieaccess \
308 ${DESTDIR}/usr/share/examples/etc
309 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
310 DESTDIR=${DESTDIR}/usr/share/examples
312 .include <bsd.prog.mk>