Ignore machine-check MSRs
[freebsd-src/fkvm-freebsd.git] / etc / Makefile
blob29e72aa52ebed7cd7ec3606789348ced1ca48b37
1 # from: @(#)Makefile 5.11 (Berkeley) 5/21/91
2 # $FreeBSD$
4 .include <bsd.own.mk>
6 .if ${MK_SENDMAIL} != "no"
7 SUBDIR= sendmail
8 .endif
10 BIN1= amd.map apmd.conf auth.conf \
11 crontab csh.cshrc csh.login csh.logout devd.conf devfs.conf \
12 ddb.conf dhclient.conf disktab fbtab freebsd-update.conf \
13 ftpusers gettytab group \
14 hosts hosts.allow hosts.equiv hosts.lpd \
15 inetd.conf libalias.conf login.access login.conf mac.conf motd \
16 netconfig network.subr networks newsyslog.conf nsswitch.conf \
17 portsnap.conf pf.os phones profile protocols \
18 rc rc.bsdextended rc.firewall rc.firewall6 rc.initdiskless \
19 rc.sendmail rc.shutdown \
20 rc.subr regdomain.xml remote rpc services shells \
21 snmpd.config sysctl.conf syslog.conf \
22 etc.${MACHINE_ARCH}/ttys \
23 ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
24 ${.CURDIR}/../usr.bin/mail/misc/mail.rc \
25 ${.CURDIR}/../usr.bin/locate/locate/locate.rc
27 OPENBSMDIR= ${.CURDIR}/../contrib/openbsm
28 BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \
29 ${OPENBSMDIR}/etc/audit_event
30 BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \
31 ${OPENBSMDIR}/etc/audit_user
32 BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn
33 BSM_ETC_DIR= ${DESTDIR}/etc/security
35 .if ${MK_LPR} != "no"
36 BIN1+= printcap
37 .endif
39 .if ${MK_NS_CACHING} != "no"
40 BIN1+= nscd.conf
41 .endif
43 .if ${MK_OPENSSH} != "no"
44 SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
45 ${.CURDIR}/../crypto/openssh/sshd_config \
46 ${.CURDIR}/../crypto/openssh/moduli
47 .endif
48 .if ${MK_OPENSSL} != "no"
49 SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
50 .endif
52 # -rwxr-xr-x root:wheel, for the new cron root:wheel
53 BIN2= netstart pccard_ether rc.suspend rc.resume
55 MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
56 BSD.var.dist BSD.x11.dist BSD.x11-4.dist
57 .if ${MK_SENDMAIL} != "no"
58 MTREE+= BSD.sendmail.dist
59 .endif
60 .if ${MK_BIND} != "no"
61 MTREE+= BIND.chroot.dist
62 .if ${MK_BIND_LIBS} != "no"
63 MTREE+= BIND.include.dist
64 .endif
65 .endif
67 PPPCNF= ppp.conf
69 .if ${MK_SENDMAIL} == "no"
70 ETCMAIL=mailer.conf aliases
71 .else
72 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
73 mailertable.sample aliases
74 .endif
76 # Special top level files for FreeBSD
77 FREEBSD=COPYRIGHT
79 afterinstall:
80 .if ${MK_MAN} != "no"
81 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb
82 .endif
84 distribute:
85 ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
86 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
88 .include <bsd.endian.mk>
89 .if ${TARGET_ENDIANNESS} == "1234"
90 CAP_MKDB_ENDIAN?= -l
91 PWD_MKDB_ENDIAN?= -L
92 .elif ${TARGET_ENDIANNESS} == "4321"
93 CAP_MKDB_ENDIAN?= -b
94 PWD_MKDB_ENDIAN?= -B
95 .else
96 CAP_MKDB_ENDIAN?=
97 PWD_MKDB_ENDIAN?=
98 .endif
100 distribution:
101 .if !defined(DESTDIR)
102 @echo "set DESTDIR before running \"make ${.TARGET}\""
103 @false
104 .endif
105 cd ${.CURDIR}; \
106 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
107 ${BIN1} ${DESTDIR}/etc; \
108 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
109 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
110 ${BIN2} ${DESTDIR}/etc; \
111 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
112 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
113 pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
114 ${DESTDIR}/etc/master.passwd
115 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
116 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
117 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
118 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
119 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
120 ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
121 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
122 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
123 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install
124 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \
125 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
126 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
127 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
128 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
129 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
130 .if ${MK_BIND_MTREE} != "no"
131 @if [ ! -e ${DESTDIR}/etc/namedb ]; then \
132 set -x; \
133 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
135 .endif
136 .if ${MK_BIND_ETC} != "no"
137 ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install
138 .endif
139 .if ${MK_SENDMAIL} != "no"
140 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
141 .endif
142 .if ${MK_OPENSSH} != "no"
143 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
144 ${SSH} ${DESTDIR}/etc/ssh
145 .endif
146 .if ${MK_OPENSSL} != "no"
147 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
148 ${SSL} ${DESTDIR}/etc/ssl
149 .endif
150 .if ${MK_KERBEROS} != "no"
151 cd ${.CURDIR}/root; \
152 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
153 dot.k5login ${DESTDIR}/root/.k5login;
154 .endif
155 cd ${.CURDIR}/root; \
156 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
157 dot.cshrc ${DESTDIR}/root/.cshrc; \
158 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
159 dot.login ${DESTDIR}/root/.login; \
160 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
161 dot.profile ${DESTDIR}/root/.profile; \
162 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
163 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
164 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
165 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
166 ${MTREE} ${DESTDIR}/etc/mtree
167 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
168 ${PPPCNF} ${DESTDIR}/etc/ppp
169 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
170 ${ETCMAIL} ${DESTDIR}/etc/mail
171 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
172 ! -f ${DESTDIR}/etc/aliases ]; then \
173 set -x; \
174 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
176 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
177 ${DESTDIR}/etc/dumpdates
178 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
179 ${DESTDIR}/var/db/locate.database
180 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
181 ${DESTDIR}/var/crash
182 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
183 ${FREEBSD} ${DESTDIR}/
184 .if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints)
185 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
186 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
187 ${DESTDIR}/boot/device.hints
188 .endif
190 distrib-dirs:
191 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
192 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
193 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
194 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
195 -p ${DESTDIR}/usr/include
196 .if ${MK_BIND_LIBS} != "no"
197 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
198 -p ${DESTDIR}/usr/include
199 .endif
200 .if ${MK_BIND_MTREE} != "no"
201 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
202 -p ${DESTDIR}/var/named
203 .endif
204 .if ${MK_SENDMAIL} != "no"
205 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
206 .endif
207 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
208 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
209 cd ${DESTDIR}/usr/share/man; \
210 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
211 while [ $$# -gt 0 ] ; \
212 do \
213 rm -rf "$$1"; \
214 ln -s "$$2" "$$1"; \
215 shift; shift; \
216 done
217 cd ${DESTDIR}/usr/share/openssl/man; \
218 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
219 while [ $$# -gt 0 ] ; \
220 do \
221 rm -rf "$$1"; \
222 ln -s "$$2" "$$1"; \
223 shift; shift; \
224 done
225 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
226 cd ${DESTDIR}/usr/share/nls; \
227 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
228 while [ $$# -gt 0 ] ; \
229 do \
230 rm -rf "$$1"; \
231 ln -s "$$2" "$$1"; \
232 shift; shift; \
233 done
235 etc-examples:
236 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
237 ${BIN1} ${BIN2} nsmb.conf opieaccess \
238 ${DESTDIR}/usr/share/examples/etc
239 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
240 DESTDIR=${DESTDIR}/usr/share/examples
242 .include <bsd.prog.mk>