Adjust nfs module loading to use nfs.ko (4.x style) rather then the
[dragonfly.git] / etc / Makefile
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.7 2003/11/19 01:05:32 dillon Exp $
4
5 .if !defined(NO_SENDMAIL)
6 SUBDIR= sendmail
7 .endif
8
9 BINUPDATE= apmd.conf fbtab gettytab network.subr \
10         protocols \
11         rc rc.firewall rc.firewall6 \
12         rc.sendmail rc.shutdown \
13         rc.subr rpc services \
14         etc.${MACHINE_ARCH}/disktab \
15         ${.CURDIR}/../usr.bin/mail/misc/mail.rc \
16         ${.CURDIR}/../usr.bin/locate/locate/locate.rc
17
18 BIN1=   ${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
31 .if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
32 .if !defined(NO_OPENSSH)
33 SSH=    ${.CURDIR}/../crypto/openssh/ssh_config \
34         ${.CURDIR}/../crypto/openssh/sshd_config \
35         moduli
36 .endif
37 SSL=    ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
38 .endif
39
40 # -rwxr-xr-x root:wheel, for the new cron root:wheel
41 BIN2=   pccard_ether rc.suspend rc.resume
42
43 DEFAULTS= rc.conf make.conf pccard.conf periodic.conf
44
45 MTREE=  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)
48 MTREE+= BSD.sendmail.dist
49 .endif
50
51 NAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
52         make-localhost
53
54 PPPCNF= ppp.conf
55
56 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
57         mailertable.sample aliases
58
59 # Special top level files for FreeBSD
60 FREEBSD=COPYRIGHT
61
62 distribute:
63         cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
64 .if defined(OBJFORMAT)
65         echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/${DISTRIBUTION}/etc/objformat
66 .endif
67
68 upgrade_etc:
69         cd ${.CURDIR}; \
70             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
71                 ${BINUPDATE} ${DESTDIR}/etc; \
72             cap_mkdb ${DESTDIR}/etc/login.conf; \
73             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
74                 ${BIN2} ${DESTDIR}/etc;
75         cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
76             ${DEFAULTS} ${DESTDIR}/etc/defaults
77         cd ${.CURDIR}/periodic; ${MAKE} install
78         cd ${.CURDIR}/rc.d; ${MAKE} install 
79         cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
80         cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
81         cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
82 .if !defined(NO_I4B)
83         cd ${.CURDIR}/isdn; ${MAKE} install
84 .endif
85 .if !defined(NO_MAKEDEV)
86         cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
87             MAKEDEV.local MAKEDEV ${DESTDIR}/dev
88 .if !defined(NO_MAKEDEV_RUN)
89         cd ${DESTDIR}/dev; sh MAKEDEV all
90 .endif
91 .endif
92         cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
93             ${MTREE} ${DESTDIR}/etc/mtree
94         cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
95             ${FREEBSD} ${DESTDIR}/
96 .if !defined(NOMAN)
97         cd ${.CURDIR}/../share/man; ${MAKE} makedb
98 .endif
99
100 distribution:
101         cd ${.CURDIR}; \
102             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
103                 ${BIN1} ${DESTDIR}/etc; \
104             cap_mkdb ${DESTDIR}/etc/login.conf; \
105             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
106                 ${BIN2} ${DESTDIR}/etc; \
107             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
108                 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
109             pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
110         cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
111             ${DEFAULTS} ${DESTDIR}/etc/defaults
112         cd ${.CURDIR}/periodic; ${MAKE} install
113         cd ${.CURDIR}/rc.d; ${MAKE} install 
114         cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
115         cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
116         cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
117 .if !defined(NO_I4B)
118         cd ${.CURDIR}/isdn; ${MAKE} install
119 .endif
120 .if !defined(NO_SENDMAIL)
121         cd ${.CURDIR}/sendmail; ${MAKE} distribution
122 .endif
123 .if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
124 .if !defined(NO_OPENSSH)
125         cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
126             ${SSH} ${DESTDIR}/etc/ssh
127 .endif
128         cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
129             ${SSL} ${DESTDIR}/etc/ssl
130 .endif
131 .if !defined(NO_MAKEDEV)
132         cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
133             MAKEDEV.local MAKEDEV ${DESTDIR}/dev
134 .if !defined(NO_MAKEDEV_RUN)
135         cd ${DESTDIR}/dev; sh MAKEDEV all
136 .endif
137 .endif
138         cd ${.CURDIR}/root; \
139             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
140                 dot.cshrc ${DESTDIR}/root/.cshrc; \
141             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
142                 dot.klogin ${DESTDIR}/root/.klogin; \
143             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
144                 dot.login ${DESTDIR}/root/.login; \
145             ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
146                 dot.profile ${DESTDIR}/root/.profile; \
147             rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
148             ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
149             ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
150         cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
151             ${MTREE} ${DESTDIR}/etc/mtree
152         cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
153             ${NAMEDB} ${DESTDIR}/etc/namedb
154         cd ${.CURDIR}/ppp; ${INSTALL} -o root -g ${BINGRP} -m 600 \
155             ${PPPCNF} ${DESTDIR}/etc/ppp
156         cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
157             ${ETCMAIL} ${DESTDIR}/etc/mail
158         @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
159               ! -f ${DESTDIR}/etc/aliases ]; then \
160                 set -x; \
161                 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
162         fi
163         ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
164             ${DESTDIR}/etc/dumpdates
165         ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
166             ${DESTDIR}/var/db/locate.database
167         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
168             ${DESTDIR}/var/log/auth.log
169         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
170             ${DESTDIR}/var/log/cron
171         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
172             ${DESTDIR}/var/log/lpd-errs
173         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
174             ${DESTDIR}/var/log/maillog
175         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
176             ${DESTDIR}/var/log/lastlog
177         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
178             ${DESTDIR}/var/log/messages
179         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
180             ${DESTDIR}/var/log/security
181         ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
182             ${DESTDIR}/var/log/slip.log
183         ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
184             ${DESTDIR}/var/log/ppp.log
185         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
186             ${DESTDIR}/var/log/wtmp
187         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
188             ${DESTDIR}/var/run/utmp
189         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
190             ${DESTDIR}/var/crash
191         cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
192             ${FREEBSD} ${DESTDIR}/
193 .if !defined(NOMAN)
194         cd ${.CURDIR}/../share/man; ${MAKE} makedb
195 .endif
196
197 distrib-dirs:
198         -set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
199         while [ $$# -gt 0 ] ; \
200         do \
201                 for dir in /usr/share/locale \
202                            /usr/share/nls \
203                            /usr/local/share/nls; \
204                 do \
205                         test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
206                         test -L "$$2" && rm -rf "$$2"; \
207                         test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
208                 done; \
209                 shift; shift; \
210         done
211         mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
212         mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
213         mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
214         mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
215                 -p ${DESTDIR}/usr/include
216         mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
217                 -p ${DESTDIR}/usr/libdata/perl/5.00503/mach
218 .if !defined(NO_SENDMAIL)
219         mtree -deU -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
220 .endif
221         cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
222         cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
223         cd ${DESTDIR}/usr/share/man; \
224         set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
225         while [ $$# -gt 0 ] ; \
226         do \
227                 rm -rf "$$1"; \
228                 ln -s "$$2" "$$1"; \
229                 shift; shift; \
230         done
231         cd ${DESTDIR}/usr/share/locale; \
232         set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
233         while [ $$# -gt 0 ] ; \
234         do \
235                 rm -rf "$$1"; \
236                 ln -s "$$2" "$$1"; \
237                 shift; shift; \
238         done
239         cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
240         cd ${DESTDIR}/usr/share/nls; \
241         set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
242         while [ $$# -gt 0 ] ; \
243         do \
244                 rm -rf "$$1"; \
245                 ln -s "$$2" "$$1"; \
246                 shift; shift; \
247         done
248
249 etc-examples:
250         cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
251             ${BIN1} ${BIN2} nsmb.conf opieaccess \
252             ${DESTDIR}/usr/share/examples/etc
253         cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
254             ${DEFAULTS} ${DESTDIR}/usr/share/examples/etc/defaults
255
256 .include <bsd.prog.mk>