1 # from: @(#)Makefile 5.11 (Berkeley) 5/21/91
2 # $FreeBSD: src/etc/Makefile,v 1.219.2.38 2003/03/04 09:49:00 ru Exp $
3 # $DragonFly: src/etc/Makefile,v 1.29 2004/09/21 21:25:28 joerg Exp $
5 .if !defined(NO_SENDMAIL)
9 BINUPDATE= apmd.conf fbtab gettytab network.subr \
12 rc rc.firewall rc.firewall6 \
13 rc.sendmail rc.shutdown \
14 rc.subr rpc services \
15 etc.${MACHINE_ARCH}/disktab \
16 ${.CURDIR}/../usr.bin/mail/misc/mail.rc \
17 ${.CURDIR}/../usr.bin/locate/locate/locate.rc
21 crontab csh.cshrc csh.login csh.logout \
22 dhclient.conf dm.conf ftpusers group \
23 hosts hosts.allow host.conf hosts.equiv hosts.lpd \
24 inetd.conf login.access login.conf \
25 motd modems networks newsyslog.conf \
26 pam.conf pf.conf phones printcap profile \
28 shells sysctl.conf syslog.conf usbd.conf \
29 etc.${MACHINE_ARCH}/ttys \
30 ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config
32 .if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
33 .if !defined(NO_OPENSSH)
38 SSL= ${.CURDIR}/../crypto/openssl-0.9.7d/apps/openssl.cnf
41 # -rwxr-xr-x root:wheel, for the new cron root:wheel
42 BIN2= pccard_ether rc.suspend rc.resume
44 DEFAULTS= rc.conf make.conf pccard.conf periodic.conf
46 MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
47 BSD.var.dist BSD.x11.dist BSD.x11-4.dist
48 .if !defined(NO_SENDMAIL)
49 MTREE+= BSD.sendmail.dist
52 NAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
53 make-localhost getroot README
57 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
58 mailertable.sample aliases
60 # Special top level files for FreeBSD
64 cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
67 cd ${.CURDIR}/../share/mk; ${MAKE} install
69 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
70 ${BINUPDATE} ${DESTDIR}/etc; \
71 cap_mkdb ${DESTDIR}/etc/login.conf; \
72 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
73 ${BIN2} ${DESTDIR}/etc;
74 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
75 ${DEFAULTS} ${DESTDIR}/etc/defaults
76 cd ${.CURDIR}/periodic; ${MAKE} install
77 cd ${.CURDIR}/rc.d; ${MAKE} install
78 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
79 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
81 cd ${.CURDIR}/isdn; ${MAKE} install
83 .if !defined(NO_MAKEDEV)
84 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
85 MAKEDEV.local MAKEDEV ${DESTDIR}/dev
86 .if !defined(NO_MAKEDEV_RUN)
87 cd ${DESTDIR}/dev; sh MAKEDEV all
90 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
91 ${MTREE} ${DESTDIR}/etc/mtree
92 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
93 ${FREEBSD} ${DESTDIR}/
95 cd ${.CURDIR}/../share/man; ${MAKE} makedb
97 rm -f ${DESTDIR}/usr/include/machine/ioctl_meteor.h
98 rm -f ${DESTDIR}/usr/include/machine/ioctl_bt848.h
99 ln -s "../dev/video/bktr/ioctl_bt848.h" ${DESTDIR}/usr/include/machine/ioctl_bt848.h
100 ln -s "../dev/video/meteor/ioctl_meteor.h" ${DESTDIR}/usr/include/machine/ioctl_meteor.h
101 .if exists(${DESTDIR}/usr/sbin/named-checkzone)
102 rm -f ${DESTDIR}/usr/libexec/named-xfer
103 rm -f ${DESTDIR}/usr/bin/dnsquery
104 rm -f ${DESTDIR}/usr/bin/dnskeygen
105 rm -f ${DESTDIR}/usr/sbin/ndc
107 .if exists(${DESTDIR}/usr/lib/crtbegin.o)
108 csh -c "rm -f ${DESTDIR}/usr/lib/gcc2/{crtbegin.o,crtbeginS.o,crtend.o,crtendS.o}"
109 csh -c "rm -f ${DESTDIR}/usr/lib/gcc3/{crtbegin.o,crtbeginS.o,crtend.o,crtendS.o}"
111 .if exists(${DESTDIR}/usr/include/netproto/802_11/if_wavelan_ieee.h)
112 rm -f ${DESTDIR}/usr/include/dev/netif/wi/if_wavelan_ieee.h
113 rm -f ${DESTDIR}/usr/include/net/if_ieee80211.h
115 .if exists(${DESTDIR}/usr/libexec/binutils212/elf/as)
116 ldconfig -m ${DESTDIR}/usr/lib/gcc2
117 rm -rf ${DESTDIR}/usr/lib/gcc3
118 rm -rf ${DESTDIR}/usr/libexec/gcc3
119 rm -rf ${DESTDIR}/usr/libdata/ldscripts
120 rm -rf ${DESTDIR}/usr/libdata/gcc2
121 rm -rf ${DESTDIR}/usr/libdata/gcc3
122 rm -rf ${DESTDIR}/usr/libexec/elf
123 rm -rf ${DESTDIR}/usr/libexec/aout
124 rm -rf ${DESTDIR}/usr/bin/gcc2
125 rm -rf ${DESTDIR}/usr/bin/gcc3
126 rm -rf ${DESTDIR}/usr/include/g++
127 csh -c "rm -f ${DESTDIR}/usr/bin/{genassym,gensetdefs,nawk}"
128 csh -c "rm -f ${DESTDIR}/usr/share/man/{man8,cat8}/{genassym,gensetdefs}.8.gz"
129 csh -c "rm -f ${DESTDIR}/usr/share/man/{man1,cat1}/{gawk,nawk}.1.gz"
130 csh -c "rm -f ${DESTDIR}/usr/libexec/{cc1,cc1obj,cc1plus}"
131 csh -c "rm -f ${DESTDIR}/usr/libexec/{cpp,cpp0,f771,objformat}"
132 csh -c "rm -f ${DESTDIR}/usr/libexec/binutils212/{cc1,cc1obj,cc1plus}"
133 csh -c "rm -f ${DESTDIR}/usr/libexec/binutils212/{cpp,cpp0,f771,objformat}"
134 csh -c "rm -f ${DESTDIR}/usr/libexec/binutils214/{cc1,cc1obj,cc1plus}"
135 csh -c "rm -f ${DESTDIR}/usr/libexec/binutils214/{cpp,cpp0,f771,objformat}"
136 csh -c "rm -f ${DESTDIR}/usr/lib/{libgcc.a,libgcc_p.a}"
137 csh -c "rm -f ${DESTDIR}/usr/lib/{libobjc.a,libobjc_p.a,libstdc++.a}"
138 csh -c "rm -f ${DESTDIR}/usr/lib/{libstdc++.so,libstdc++.so.3}"
139 csh -c "rm -f ${DESTDIR}/usr/lib/{libstdc++_p.a}"
140 csh -c "rm -f ${DESTDIR}/usr/bin/CC"
141 rm -f ${DESTDIR}/usr/bin/makewhatis
142 rm -f ${DESTDIR}/usr/sbin/prebind
145 .if exists(${DESTDIR}/usr/share/examples/bc)
146 rm -rf ${DESTDIR}/usr/share/examples/bc
148 .if exists(${DESTDIR}/usr/share/info/dc.info.gz)
149 gzip -d ${DESTDIR}/usr/share/info/dc.info.gz
150 install-info --delete ${DESTDIR}/usr/share/info/dc.info ${DESTDIR}/usr/share/info/dir
151 rm -f ${DESTDIR}/usr/share/info/dc.info ${DESTDIR}/usr/share/info/dc.info.gz
156 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
157 ${BIN1} ${DESTDIR}/etc; \
158 cap_mkdb ${DESTDIR}/etc/login.conf; \
159 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
160 ${BIN2} ${DESTDIR}/etc; \
161 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
162 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
163 pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
164 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
165 ${DEFAULTS} ${DESTDIR}/etc/defaults
166 cd ${.CURDIR}/periodic; ${MAKE} install
167 cd ${.CURDIR}/rc.d; ${MAKE} install
168 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
169 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
171 cd ${.CURDIR}/isdn; ${MAKE} install
173 .if !defined(NO_SENDMAIL)
174 cd ${.CURDIR}/sendmail; ${MAKE} obj
175 cd ${.CURDIR}/sendmail; ${MAKE} distribution
177 .if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
178 .if !defined(NO_OPENSSH)
180 cd ${.CURDIR}/../secure/${_f} && ${MAKE} obj
181 cd ${.CURDIR}/../secure/${_f} && ${MAKE} etc-ssh
184 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
185 ${SSL} ${DESTDIR}/etc/ssl
187 .if !defined(NO_MAKEDEV)
188 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
189 MAKEDEV.local MAKEDEV ${DESTDIR}/dev
190 .if !defined(NO_MAKEDEV_RUN)
191 cd ${DESTDIR}/dev; sh MAKEDEV all
194 cd ${.CURDIR}/root; \
195 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
196 dot.cshrc ${DESTDIR}/root/.cshrc; \
197 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
198 dot.klogin ${DESTDIR}/root/.klogin; \
199 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
200 dot.login ${DESTDIR}/root/.login; \
201 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
202 dot.profile ${DESTDIR}/root/.profile; \
203 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
204 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
205 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
206 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
207 ${MTREE} ${DESTDIR}/etc/mtree
208 cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
209 ${NAMEDB} ${DESTDIR}/etc/namedb
210 cd ${.CURDIR}/ppp; ${INSTALL} -o root -g ${BINGRP} -m 600 \
211 ${PPPCNF} ${DESTDIR}/etc/ppp
212 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
213 ${ETCMAIL} ${DESTDIR}/etc/mail
214 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
215 ! -f ${DESTDIR}/etc/aliases ]; then \
217 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
219 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
220 ${DESTDIR}/etc/dumpdates
221 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
222 ${DESTDIR}/var/db/locate.database
223 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
224 ${DESTDIR}/var/log/auth.log
225 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
226 ${DESTDIR}/var/log/cron
227 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
228 ${DESTDIR}/var/log/lpd-errs
229 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
230 ${DESTDIR}/var/log/maillog
231 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
232 ${DESTDIR}/var/log/lastlog
233 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
234 ${DESTDIR}/var/log/messages
235 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
236 ${DESTDIR}/var/log/security
237 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
238 ${DESTDIR}/var/log/slip.log
239 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
240 ${DESTDIR}/var/log/ppp.log
241 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
242 ${DESTDIR}/var/log/wtmp
243 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
244 ${DESTDIR}/var/run/utmp
245 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
247 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
248 ${FREEBSD} ${DESTDIR}/
250 cd ${.CURDIR}/../share/man; ${MAKE} makedb
254 -set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
255 while [ $$# -gt 0 ] ; \
257 for dir in /usr/share/locale \
259 /usr/local/share/nls; \
261 test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
262 test -L "$$2" && rm -rf "$$2"; \
263 test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
267 mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
268 mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
269 mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
270 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
271 -p ${DESTDIR}/usr/include
272 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
273 -p ${DESTDIR}/usr/libdata/perl/5.00503/mach
274 .if !defined(NO_SENDMAIL)
275 mtree -deU -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
277 cd ${DESTDIR}/etc/namedb; rm -f etc/namedb; ln -s ".." etc/namedb
278 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
279 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
280 cd ${DESTDIR}/usr/share/man; \
281 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
282 while [ $$# -gt 0 ] ; \
288 cd ${DESTDIR}/usr/share/locale; \
289 set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
290 while [ $$# -gt 0 ] ; \
296 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
297 cd ${DESTDIR}/usr/share/nls; \
298 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
299 while [ $$# -gt 0 ] ; \
307 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
308 ${BIN1} ${BIN2} nsmb.conf opieaccess \
309 ${DESTDIR}/usr/share/examples/etc
310 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
311 ${DEFAULTS} ${DESTDIR}/usr/share/examples/etc/defaults
313 .include <bsd.prog.mk>