Remove two mis-added .orig files.
[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 $
bb7c020d 3# $DragonFly: src/etc/Makefile,v 1.18 2004/04/12 16:29:05 dillon 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)
33SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
34 ${.CURDIR}/../crypto/openssh/sshd_config \
35 moduli
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 \
52 make-localhost
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
17030342 96.if exists(${DESTDIR}/usr/libexec/binutils212/elf/as)
5fb65e14
MD
97 ldconfig -m ${DESTDIR}/usr/lib/gcc2
98 rm -rf ${DESTDIR}/usr/libdata/ldscripts
17030342
MD
99 rm -rf ${DESTDIR}/usr/libdata/gcc2
100 rm -rf ${DESTDIR}/usr/libdata/gcc3
5fb65e14 101 rm -rf ${DESTDIR}/usr/libexec/elf
aba5ef0f 102 rm -rf ${DESTDIR}/usr/libexec/aout
17030342
MD
103 rm -rf ${DESTDIR}/usr/bin/gcc2
104 rm -rf ${DESTDIR}/usr/bin/gcc3
bb7c020d
MD
105 rm -rf ${DESTDIR}/usr/include/g++
106 csh -c "rm -f ${DESTDIR}/usr/bin/{genassym,gensetdefs,nawk}"
aa1fd55d 107 csh -c "rm -f ${DESTDIR}/usr/share/man/{man8,cat8}/{genassym,gensetdefs}.8.gz"
bb7c020d 108 csh -c "rm -f ${DESTDIR}/usr/share/man/{man1,cat1}/{gawk,nawk}.1.gz"
17030342
MD
109 csh -c "rm -f ${DESTDIR}/usr/libexec/{cc1,cc1obj,cc1plus}"
110 csh -c "rm -f ${DESTDIR}/usr/libexec/{cpp,cpp0,f771,objformat}"
111 csh -c "rm -f ${DESTDIR}/usr/libexec/binutils212/{cc1,cc1obj,cc1plus}"
112 csh -c "rm -f ${DESTDIR}/usr/libexec/binutils212/{cpp,cpp0,f771,objformat}"
113 csh -c "rm -f ${DESTDIR}/usr/libexec/binutils214/{cc1,cc1obj,cc1plus}"
114 csh -c "rm -f ${DESTDIR}/usr/libexec/binutils214/{cpp,cpp0,f771,objformat}"
5fb65e14
MD
115 csh -c "rm -f ${DESTDIR}/usr/lib/{crtbegin.o,crtbeginS.o,crtend.o}"
116 csh -c "rm -f ${DESTDIR}/usr/lib/{crtendS.o,libgcc.a,libgcc_p.a}"
117 csh -c "rm -f ${DESTDIR}/usr/lib/{libobjc.a,libobjc_p.a,libstdc++.a}"
118 csh -c "rm -f ${DESTDIR}/usr/lib/{libstdc++.so,libstdc++.so.3}"
119 csh -c "rm -f ${DESTDIR}/usr/lib/{libstdc++_p.a}"
120 csh -c "rm -f ${DESTDIR}/usr/bin/CC"
540deb60
MD
121 rm -f ${DESTDIR}/usr/bin/makewhatis
122 rm -f ${DESTDIR}/usr/sbin/prebind
5fb65e14
MD
123 ldconfig -R
124.endif
e50c8f0c 125
984263bc
MD
126distribution:
127 cd ${.CURDIR}; \
128 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
129 ${BIN1} ${DESTDIR}/etc; \
130 cap_mkdb ${DESTDIR}/etc/login.conf; \
131 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
132 ${BIN2} ${DESTDIR}/etc; \
133 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
134 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
135 pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
136 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
137 ${DEFAULTS} ${DESTDIR}/etc/defaults
138 cd ${.CURDIR}/periodic; ${MAKE} install
9c600e7d 139 cd ${.CURDIR}/rc.d; ${MAKE} install
984263bc
MD
140 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
141 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
142.if !defined(NO_I4B)
143 cd ${.CURDIR}/isdn; ${MAKE} install
144.endif
145.if !defined(NO_SENDMAIL)
146 cd ${.CURDIR}/sendmail; ${MAKE} distribution
147.endif
984263bc
MD
148.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
149.if !defined(NO_OPENSSH)
150 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
151 ${SSH} ${DESTDIR}/etc/ssh
152.endif
153 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
154 ${SSL} ${DESTDIR}/etc/ssl
155.endif
156.if !defined(NO_MAKEDEV)
157 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
158 MAKEDEV.local MAKEDEV ${DESTDIR}/dev
159.if !defined(NO_MAKEDEV_RUN)
160 cd ${DESTDIR}/dev; sh MAKEDEV all
161.endif
162.endif
163 cd ${.CURDIR}/root; \
164 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
165 dot.cshrc ${DESTDIR}/root/.cshrc; \
166 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
167 dot.klogin ${DESTDIR}/root/.klogin; \
168 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
169 dot.login ${DESTDIR}/root/.login; \
170 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
171 dot.profile ${DESTDIR}/root/.profile; \
172 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
173 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
174 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
175 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
176 ${MTREE} ${DESTDIR}/etc/mtree
177 cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
178 ${NAMEDB} ${DESTDIR}/etc/namedb
179 cd ${.CURDIR}/ppp; ${INSTALL} -o root -g ${BINGRP} -m 600 \
180 ${PPPCNF} ${DESTDIR}/etc/ppp
181 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
182 ${ETCMAIL} ${DESTDIR}/etc/mail
183 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
184 ! -f ${DESTDIR}/etc/aliases ]; then \
185 set -x; \
186 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
187 fi
188 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
189 ${DESTDIR}/etc/dumpdates
190 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
191 ${DESTDIR}/var/db/locate.database
192 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
193 ${DESTDIR}/var/log/auth.log
194 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
195 ${DESTDIR}/var/log/cron
196 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
197 ${DESTDIR}/var/log/lpd-errs
198 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
199 ${DESTDIR}/var/log/maillog
200 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
201 ${DESTDIR}/var/log/lastlog
202 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
203 ${DESTDIR}/var/log/messages
204 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
205 ${DESTDIR}/var/log/security
206 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
207 ${DESTDIR}/var/log/slip.log
208 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
209 ${DESTDIR}/var/log/ppp.log
210 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
211 ${DESTDIR}/var/log/wtmp
212 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
213 ${DESTDIR}/var/run/utmp
214 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
215 ${DESTDIR}/var/crash
216 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
217 ${FREEBSD} ${DESTDIR}/
218.if !defined(NOMAN)
219 cd ${.CURDIR}/../share/man; ${MAKE} makedb
220.endif
221
222distrib-dirs:
223 -set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
224 while [ $$# -gt 0 ] ; \
225 do \
226 for dir in /usr/share/locale \
227 /usr/share/nls \
228 /usr/local/share/nls; \
229 do \
230 test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
231 test -L "$$2" && rm -rf "$$2"; \
232 test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
233 done; \
234 shift; shift; \
235 done
236 mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
237 mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
238 mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
239 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
240 -p ${DESTDIR}/usr/include
241 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
242 -p ${DESTDIR}/usr/libdata/perl/5.00503/mach
243.if !defined(NO_SENDMAIL)
244 mtree -deU -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
245.endif
246 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
247 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
248 cd ${DESTDIR}/usr/share/man; \
249 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
250 while [ $$# -gt 0 ] ; \
251 do \
252 rm -rf "$$1"; \
253 ln -s "$$2" "$$1"; \
254 shift; shift; \
255 done
256 cd ${DESTDIR}/usr/share/locale; \
257 set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
258 while [ $$# -gt 0 ] ; \
259 do \
260 rm -rf "$$1"; \
261 ln -s "$$2" "$$1"; \
262 shift; shift; \
263 done
264 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
265 cd ${DESTDIR}/usr/share/nls; \
266 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
267 while [ $$# -gt 0 ] ; \
268 do \
269 rm -rf "$$1"; \
270 ln -s "$$2" "$$1"; \
271 shift; shift; \
272 done
273
274etc-examples:
275 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
276 ${BIN1} ${BIN2} nsmb.conf opieaccess \
277 ${DESTDIR}/usr/share/examples/etc
278 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
279 ${DEFAULTS} ${DESTDIR}/usr/share/examples/etc/defaults
280
281.include <bsd.prog.mk>