The TCP stack is notified every time userland reads from the TCP socket
[dragonfly.git] / etc / Makefile
CommitLineData
984263bc
MD
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 $
9c45a0f5 3# $DragonFly: src/etc/Makefile,v 1.24 2004/07/31 19:03:00 geekgod Exp $
984263bc
MD
4
5.if !defined(NO_SENDMAIL)
6SUBDIR= sendmail
7.endif
8
e50c8f0c
MD
9BINUPDATE= apmd.conf fbtab gettytab network.subr \
10 protocols \
9c600e7d
MD
11 rc rc.firewall rc.firewall6 \
12 rc.sendmail rc.shutdown \
e50c8f0c 13 rc.subr rpc services \
984263bc 14 etc.${MACHINE_ARCH}/disktab \
984263bc
MD
15 ${.CURDIR}/../usr.bin/mail/misc/mail.rc \
16 ${.CURDIR}/../usr.bin/locate/locate/locate.rc
17
e50c8f0c
MD
18BIN1= ${BINUPDATE} \
19 amd.map auth.conf \
20 crontab csh.cshrc csh.login csh.logout \
21 dhclient.conf dm.conf ftpusers group \
22 hosts hosts.allow host.conf hosts.equiv hosts.lpd \
23 inetd.conf login.access login.conf \
24 motd modems networks newsyslog.conf \
25 pam.conf phones printcap profile \
26 remote \
27 shells sysctl.conf syslog.conf usbd.conf \
28 etc.${MACHINE_ARCH}/ttys \
29 ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config
30
984263bc
MD
31.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
32.if !defined(NO_OPENSSH)
9c45a0f5
SU
33SSH= lib/libssh \
34 usr.bin/ssh \
35 usr.sbin/sshd
984263bc
MD
36.endif
37SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
38.endif
39
40# -rwxr-xr-x root:wheel, for the new cron root:wheel
9c600e7d 41BIN2= pccard_ether rc.suspend rc.resume
984263bc
MD
42
43DEFAULTS= rc.conf make.conf pccard.conf periodic.conf
44
45MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
46 BSD.var.dist BSD.x11.dist BSD.x11-4.dist
47.if !defined(NO_SENDMAIL)
48MTREE+= BSD.sendmail.dist
49.endif
50
51NAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
cd7c643f 52 make-localhost getroot README
984263bc
MD
53
54PPPCNF= ppp.conf
55
56ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
57 mailertable.sample aliases
58
59# Special top level files for FreeBSD
60FREEBSD=COPYRIGHT
61
62distribute:
63 cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
984263bc 64
e50c8f0c 65upgrade_etc:
1bccbc53 66 cd ${.CURDIR}/../share/mk; ${MAKE} install
e50c8f0c
MD
67 cd ${.CURDIR}; \
68 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
69 ${BINUPDATE} ${DESTDIR}/etc; \
70 cap_mkdb ${DESTDIR}/etc/login.conf; \
71 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
72 ${BIN2} ${DESTDIR}/etc;
73 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
74 ${DEFAULTS} ${DESTDIR}/etc/defaults
75 cd ${.CURDIR}/periodic; ${MAKE} install
76 cd ${.CURDIR}/rc.d; ${MAKE} install
e50c8f0c
MD
77 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
78 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
79.if !defined(NO_I4B)
80 cd ${.CURDIR}/isdn; ${MAKE} install
81.endif
82.if !defined(NO_MAKEDEV)
83 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
84 MAKEDEV.local MAKEDEV ${DESTDIR}/dev
85.if !defined(NO_MAKEDEV_RUN)
86 cd ${DESTDIR}/dev; sh MAKEDEV all
87.endif
88.endif
89 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
90 ${MTREE} ${DESTDIR}/etc/mtree
91 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
92 ${FREEBSD} ${DESTDIR}/
93.if !defined(NOMAN)
94 cd ${.CURDIR}/../share/man; ${MAKE} makedb
95.endif
a8f70ff2
MD
96 rm -f ${DESTDIR}/usr/include/machine/ioctl_meteor.h
97 rm -f ${DESTDIR}/usr/include/machine/ioctl_bt848.h
98 ln -s "../dev/video/bktr/ioctl_bt848.h" ${DESTDIR}/usr/include/machine/ioctl_bt848.h
99 ln -s "../dev/video/meteor/ioctl_meteor.h" ${DESTDIR}/usr/include/machine/ioctl_meteor.h
cd7c643f
MD
100.if exists(${DESTDIR}/usr/sbin/named-checkzone)
101 rm -f ${DESTDIR}/usr/libexec/named-xfer
102 rm -f ${DESTDIR}/usr/bin/dnsquery
103 rm -f ${DESTDIR}/usr/bin/dnskeygen
104 rm -f ${DESTDIR}/usr/sbin/ndc
105.endif
703c4292
MD
106.if exists(${DESTDIR}/usr/lib/crtbegin.o)
107 csh -c "rm -f ${DESTDIR}/usr/lib/gcc2/{crtbegin.o,crtbeginS.o,crtend.o,crtendS.o}"
108 csh -c "rm -f ${DESTDIR}/usr/lib/gcc3/{crtbegin.o,crtbeginS.o,crtend.o,crtendS.o}"
859c656a 109.endif
17030342 110.if exists(${DESTDIR}/usr/libexec/binutils212/elf/as)
5fb65e14 111 ldconfig -m ${DESTDIR}/usr/lib/gcc2
73e93a5d
DR
112 rm -rf ${DESTDIR}/usr/lib/gcc3
113 rm -rf ${DESTDIR}/usr/libexec/gcc3
5fb65e14 114 rm -rf ${DESTDIR}/usr/libdata/ldscripts
17030342
MD
115 rm -rf ${DESTDIR}/usr/libdata/gcc2
116 rm -rf ${DESTDIR}/usr/libdata/gcc3
5fb65e14 117 rm -rf ${DESTDIR}/usr/libexec/elf
aba5ef0f 118 rm -rf ${DESTDIR}/usr/libexec/aout
17030342
MD
119 rm -rf ${DESTDIR}/usr/bin/gcc2
120 rm -rf ${DESTDIR}/usr/bin/gcc3
bb7c020d
MD
121 rm -rf ${DESTDIR}/usr/include/g++
122 csh -c "rm -f ${DESTDIR}/usr/bin/{genassym,gensetdefs,nawk}"
aa1fd55d 123 csh -c "rm -f ${DESTDIR}/usr/share/man/{man8,cat8}/{genassym,gensetdefs}.8.gz"
bb7c020d 124 csh -c "rm -f ${DESTDIR}/usr/share/man/{man1,cat1}/{gawk,nawk}.1.gz"
17030342
MD
125 csh -c "rm -f ${DESTDIR}/usr/libexec/{cc1,cc1obj,cc1plus}"
126 csh -c "rm -f ${DESTDIR}/usr/libexec/{cpp,cpp0,f771,objformat}"
127 csh -c "rm -f ${DESTDIR}/usr/libexec/binutils212/{cc1,cc1obj,cc1plus}"
128 csh -c "rm -f ${DESTDIR}/usr/libexec/binutils212/{cpp,cpp0,f771,objformat}"
129 csh -c "rm -f ${DESTDIR}/usr/libexec/binutils214/{cc1,cc1obj,cc1plus}"
130 csh -c "rm -f ${DESTDIR}/usr/libexec/binutils214/{cpp,cpp0,f771,objformat}"
859c656a 131 csh -c "rm -f ${DESTDIR}/usr/lib/{libgcc.a,libgcc_p.a}"
5fb65e14
MD
132 csh -c "rm -f ${DESTDIR}/usr/lib/{libobjc.a,libobjc_p.a,libstdc++.a}"
133 csh -c "rm -f ${DESTDIR}/usr/lib/{libstdc++.so,libstdc++.so.3}"
134 csh -c "rm -f ${DESTDIR}/usr/lib/{libstdc++_p.a}"
135 csh -c "rm -f ${DESTDIR}/usr/bin/CC"
540deb60
MD
136 rm -f ${DESTDIR}/usr/bin/makewhatis
137 rm -f ${DESTDIR}/usr/sbin/prebind
5fb65e14
MD
138 ldconfig -R
139.endif
e50c8f0c 140
984263bc
MD
141distribution:
142 cd ${.CURDIR}; \
143 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
144 ${BIN1} ${DESTDIR}/etc; \
145 cap_mkdb ${DESTDIR}/etc/login.conf; \
146 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
147 ${BIN2} ${DESTDIR}/etc; \
148 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
149 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
150 pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
151 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
152 ${DEFAULTS} ${DESTDIR}/etc/defaults
153 cd ${.CURDIR}/periodic; ${MAKE} install
9c600e7d 154 cd ${.CURDIR}/rc.d; ${MAKE} install
984263bc
MD
155 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
156 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
157.if !defined(NO_I4B)
158 cd ${.CURDIR}/isdn; ${MAKE} install
159.endif
160.if !defined(NO_SENDMAIL)
a8f70ff2 161 cd ${.CURDIR}/sendmail; ${MAKE} obj
984263bc
MD
162 cd ${.CURDIR}/sendmail; ${MAKE} distribution
163.endif
984263bc
MD
164.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
165.if !defined(NO_OPENSSH)
9c45a0f5
SU
166.for _f in ${SSH}
167 cd ${.CURDIR}/../secure/${_f} && ${MAKE} etc-ssh
168.endfor
984263bc
MD
169.endif
170 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
171 ${SSL} ${DESTDIR}/etc/ssl
172.endif
173.if !defined(NO_MAKEDEV)
174 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
175 MAKEDEV.local MAKEDEV ${DESTDIR}/dev
176.if !defined(NO_MAKEDEV_RUN)
177 cd ${DESTDIR}/dev; sh MAKEDEV all
178.endif
179.endif
180 cd ${.CURDIR}/root; \
181 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
182 dot.cshrc ${DESTDIR}/root/.cshrc; \
183 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
184 dot.klogin ${DESTDIR}/root/.klogin; \
185 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
186 dot.login ${DESTDIR}/root/.login; \
187 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
188 dot.profile ${DESTDIR}/root/.profile; \
189 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
190 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
191 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
192 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
193 ${MTREE} ${DESTDIR}/etc/mtree
194 cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
195 ${NAMEDB} ${DESTDIR}/etc/namedb
196 cd ${.CURDIR}/ppp; ${INSTALL} -o root -g ${BINGRP} -m 600 \
197 ${PPPCNF} ${DESTDIR}/etc/ppp
198 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
199 ${ETCMAIL} ${DESTDIR}/etc/mail
200 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
201 ! -f ${DESTDIR}/etc/aliases ]; then \
202 set -x; \
203 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
204 fi
205 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
206 ${DESTDIR}/etc/dumpdates
207 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
208 ${DESTDIR}/var/db/locate.database
209 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
210 ${DESTDIR}/var/log/auth.log
211 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
212 ${DESTDIR}/var/log/cron
213 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
214 ${DESTDIR}/var/log/lpd-errs
215 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
216 ${DESTDIR}/var/log/maillog
217 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
218 ${DESTDIR}/var/log/lastlog
219 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
220 ${DESTDIR}/var/log/messages
221 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
222 ${DESTDIR}/var/log/security
223 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
224 ${DESTDIR}/var/log/slip.log
225 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
226 ${DESTDIR}/var/log/ppp.log
227 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
228 ${DESTDIR}/var/log/wtmp
229 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
230 ${DESTDIR}/var/run/utmp
231 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
232 ${DESTDIR}/var/crash
233 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
234 ${FREEBSD} ${DESTDIR}/
235.if !defined(NOMAN)
236 cd ${.CURDIR}/../share/man; ${MAKE} makedb
237.endif
238
239distrib-dirs:
240 -set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
241 while [ $$# -gt 0 ] ; \
242 do \
243 for dir in /usr/share/locale \
244 /usr/share/nls \
245 /usr/local/share/nls; \
246 do \
247 test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
248 test -L "$$2" && rm -rf "$$2"; \
249 test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
250 done; \
251 shift; shift; \
252 done
253 mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
254 mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
255 mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
256 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
257 -p ${DESTDIR}/usr/include
258 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
259 -p ${DESTDIR}/usr/libdata/perl/5.00503/mach
260.if !defined(NO_SENDMAIL)
261 mtree -deU -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
262.endif
cd7c643f 263 cd ${DESTDIR}/etc/namedb; rm -f etc/namedb; ln -s ".." etc/namedb
984263bc
MD
264 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
265 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
266 cd ${DESTDIR}/usr/share/man; \
267 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
268 while [ $$# -gt 0 ] ; \
269 do \
270 rm -rf "$$1"; \
271 ln -s "$$2" "$$1"; \
272 shift; shift; \
273 done
274 cd ${DESTDIR}/usr/share/locale; \
275 set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
276 while [ $$# -gt 0 ] ; \
277 do \
278 rm -rf "$$1"; \
279 ln -s "$$2" "$$1"; \
280 shift; shift; \
281 done
282 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
283 cd ${DESTDIR}/usr/share/nls; \
284 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
285 while [ $$# -gt 0 ] ; \
286 do \
287 rm -rf "$$1"; \
288 ln -s "$$2" "$$1"; \
289 shift; shift; \
290 done
291
292etc-examples:
293 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
294 ${BIN1} ${BIN2} nsmb.conf opieaccess \
295 ${DESTDIR}/usr/share/examples/etc
296 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
297 ${DEFAULTS} ${DESTDIR}/usr/share/examples/etc/defaults
298
299.include <bsd.prog.mk>