]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - etc/Makefile
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / etc / Makefile
1 #       from: @(#)Makefile      5.11 (Berkeley) 5/21/91
2 # $FreeBSD$
3
4 .include <bsd.own.mk>
5
6 .if ${MK_SENDMAIL} != "no"
7 SUBDIR= sendmail
8 .endif
9
10 BIN1=   auth.conf \
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.firewall6 rc.initdiskless \
19         rc.sendmail rc.shutdown \
20         rc.subr remote rpc services shells \
21         sysctl.conf syslog.conf \
22         etc.${MACHINE_ARCH}/ttys
23
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
31
32 # NB: keep these sorted by MK_* knobs
33
34 .if ${MK_AMD} != "no"
35 BIN1+= amd.map
36 .endif
37
38 .if ${MK_APM} != "no"
39 BIN1+= apmd.conf
40 .endif
41
42 .if ${MK_BSNMP} != "no"
43 BIN1+= snmpd.config
44 .endif
45
46 .if ${MK_FREEBSD_UPDATE} != "no"
47 BIN1+= freebsd-update.conf
48 .endif
49
50 .if ${MK_LOCATE} != "no"
51 BIN1+=  ${.CURDIR}/../usr.bin/locate/locate/locate.rc
52 .endif
53
54 .if ${MK_LPR} != "no"
55 BIN1+=  hosts.lpd printcap
56 .endif
57
58 .if ${MK_MAIL} != "no"
59 BIN1+=  ${.CURDIR}/../usr.bin/mail/misc/mail.rc
60 .endif
61
62 .if ${MK_MAN} != "no"
63 BIN1+=  ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config
64 .endif
65
66 .if ${MK_OPENSSH} != "no"
67 SSH=    ${.CURDIR}/../crypto/openssh/ssh_config \
68         ${.CURDIR}/../crypto/openssh/sshd_config \
69         ${.CURDIR}/../crypto/openssh/moduli
70 .endif
71 .if ${MK_OPENSSL} != "no"
72 SSL=    ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
73 .endif
74
75 .if ${MK_NS_CACHING} != "no"
76 BIN1+= nscd.conf
77 .endif
78
79 .if ${MK_PORTSNAP} != "no"
80 BIN1+= portsnap.conf
81 .endif
82
83 .if ${MK_PF} != "no"
84 BIN1+= pf.os
85 .endif
86
87 .if ${MK_TCSH} != "no"
88 BIN1+= csh.cshrc csh.login csh.logout
89 .endif
90
91 # -rwxr-xr-x root:wheel, for the new cron root:wheel
92 BIN2=   netstart pccard_ether rc.suspend rc.resume
93
94 MTREE=  BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
95         BSD.var.dist BSD.x11.dist BSD.x11-4.dist
96 .if ${MK_SENDMAIL} != "no"
97 MTREE+= BSD.sendmail.dist
98 .endif
99 .if ${MK_BIND} != "no"
100 MTREE+= BIND.chroot.dist
101 .if ${MK_BIND_LIBS} != "no"
102 MTREE+= BIND.include.dist
103 .endif
104 .endif
105
106 PPPCNF= ppp.conf
107
108 .if ${MK_SENDMAIL} == "no"
109 ETCMAIL=mailer.conf aliases
110 .else
111 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
112         mailertable.sample aliases
113 .endif
114
115 # Special top level files for FreeBSD
116 FREEBSD=COPYRIGHT
117
118 afterinstall:
119 .if ${MK_MAN} != "no"
120         ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb
121 .endif
122
123 distribute:
124         ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
125         ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
126
127 .include <bsd.endian.mk>
128 .if ${TARGET_ENDIANNESS} == "1234"
129 CAP_MKDB_ENDIAN?= -l
130 PWD_MKDB_ENDIAN?= -L
131 .elif ${TARGET_ENDIANNESS} == "4321"
132 CAP_MKDB_ENDIAN?= -b
133 PWD_MKDB_ENDIAN?= -B
134 .else
135 CAP_MKDB_ENDIAN?=
136 PWD_MKDB_ENDIAN?=
137 .endif
138
139 distribution:
140 .if !defined(DESTDIR)
141         @echo "set DESTDIR before running \"make ${.TARGET}\""
142         @false
143 .endif
144         cd ${.CURDIR}; \
145             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
146                 ${BIN1} ${DESTDIR}/etc; \
147             cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
148             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
149                 ${BIN2} ${DESTDIR}/etc; \
150             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
151                 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
152 .if ${MK_TCSH} == "no"
153         sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
154 .endif
155         pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
156             ${DESTDIR}/etc/master.passwd
157 .if ${MK_BLUETOOTH} != "no"
158         ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
159 .endif
160         ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
161         ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
162         ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
163         ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
164         ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
165         ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
166         ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
167         ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install
168         cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \
169             ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
170         cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
171             ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
172         cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
173             ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
174 .if ${MK_I4B} != "no"
175         ${_+_}cd ${.CURDIR}/isdn; ${MAKE} install
176 .endif
177 .if ${MK_BIND_MTREE} != "no"
178         @if [ ! -e ${DESTDIR}/etc/namedb ]; then \
179                 set -x; \
180                 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
181         fi
182 .endif
183 .if ${MK_BIND_ETC} != "no"
184         ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install
185 .endif
186 .if ${MK_SENDMAIL} != "no"
187         ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
188 .endif
189 .if ${MK_OPENSSH} != "no"
190         cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
191             ${SSH} ${DESTDIR}/etc/ssh
192 .endif
193 .if ${MK_OPENSSL} != "no"
194         cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
195             ${SSL} ${DESTDIR}/etc/ssl
196 .endif
197 .if ${MK_KERBEROS} != "no"
198         cd ${.CURDIR}/root; \
199             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
200                 dot.k5login ${DESTDIR}/root/.k5login;
201 .endif
202         cd ${.CURDIR}/root; \
203             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
204                 dot.profile ${DESTDIR}/root/.profile; \
205             rm -f ${DESTDIR}/.profile; \
206             ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
207 .if ${MK_TCSH} != "no"
208         cd ${.CURDIR}/root; \
209             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
210                 dot.cshrc ${DESTDIR}/root/.cshrc; \
211             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
212                 dot.login ${DESTDIR}/root/.login; \
213             rm -f ${DESTDIR}/.cshrc; \
214             ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
215 .endif
216         cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
217             ${MTREE} ${DESTDIR}/etc/mtree
218 .if ${MK_PPP} != "no"
219         cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
220             ${PPPCNF} ${DESTDIR}/etc/ppp
221 .endif
222 .if ${MK_MAIL} != "no"
223         cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
224             ${ETCMAIL} ${DESTDIR}/etc/mail
225         @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
226               ! -f ${DESTDIR}/etc/aliases ]; then \
227                 set -x; \
228                 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
229         fi
230 .endif
231         ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
232             ${DESTDIR}/etc/dumpdates
233         ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
234             ${DESTDIR}/var/db/locate.database
235         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
236             ${DESTDIR}/var/crash
237         cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
238                 ${FREEBSD} ${DESTDIR}/
239 .if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints)
240         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
241             ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
242             ${DESTDIR}/boot/device.hints
243 .endif
244
245 distrib-dirs:
246         mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
247         mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
248         mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
249         mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
250                 -p ${DESTDIR}/usr/include
251 .if ${MK_BIND_LIBS} != "no"
252         mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
253             -p ${DESTDIR}/usr/include
254 .endif
255 .if ${MK_BIND_MTREE} != "no"
256         mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
257             -p ${DESTDIR}/var/named
258 .endif
259 .if ${MK_SENDMAIL} != "no"
260         mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
261 .endif
262         cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
263         cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
264         cd ${DESTDIR}/usr/share/man; \
265         set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
266         while [ $$# -gt 0 ] ; \
267         do \
268                 rm -rf "$$1"; \
269                 ln -s "$$2" "$$1"; \
270                 shift; shift; \
271         done
272         cd ${DESTDIR}/usr/share/openssl/man; \
273         set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
274         while [ $$# -gt 0 ] ; \
275         do \
276                 rm -rf "$$1"; \
277                 ln -s "$$2" "$$1"; \
278                 shift; shift; \
279         done
280         cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
281         cd ${DESTDIR}/usr/share/nls; \
282         set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
283         while [ $$# -gt 0 ] ; \
284         do \
285                 rm -rf "$$1"; \
286                 ln -s "$$2" "$$1"; \
287                 shift; shift; \
288         done
289
290 etc-examples:
291         cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
292             ${BIN1} ${BIN2} nsmb.conf opieaccess \
293             ${DESTDIR}/usr/share/examples/etc
294         ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
295             DESTDIR=${DESTDIR}/usr/share/examples
296
297 .include <bsd.prog.mk>