Makefile revision 112984
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2# $FreeBSD: head/etc/Makefile 112984 2003-04-02 20:13:59Z ru $
3
4.if !defined(NO_SENDMAIL)
5SUBDIR=	sendmail
6.endif
7
8BIN1=	amd.map apmd.conf auth.conf \
9	crontab csh.cshrc csh.login csh.logout \
10	devd.conf dhclient.conf disktab fbtab ftpusers gettytab group \
11	hosts hosts.allow hosts.equiv hosts.lpd \
12	inetd.conf login.access login.conf \
13	mac.conf motd netconfig networks newsyslog.conf \
14	phones printcap profile protocols \
15	rc rc.atm rc.devfs rc.diskless1 rc.diskless2 rc.firewall rc.firewall6 \
16	rc.network rc.network6 rc.pccard rc.sendmail rc.serial rc.shutdown \
17	rc.subr rc.syscons rc.sysctl remote rpc services \
18	shells sysctl.conf syslog.conf usbd.conf \
19	etc.${MACHINE_ARCH}/rc.${MACHINE_ARCH} \
20	etc.${MACHINE_ARCH}/ttys \
21	${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
22	${.CURDIR}/../usr.bin/mail/misc/mail.rc \
23	${.CURDIR}/../usr.bin/locate/locate/locate.rc
24
25.if !defined(NO_I4B)
26BIN1+=	rc.isdn
27.endif
28
29.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
30.if !defined(NO_OPENSSH)
31SSH=	${.CURDIR}/../crypto/openssh/ssh_config \
32	${.CURDIR}/../crypto/openssh/sshd_config \
33	moduli
34.endif
35SSL=	${.CURDIR}/../crypto/openssl/apps/openssl.cnf
36.endif
37
38# -rwxr-xr-x root:wheel, for the new cron root:wheel
39BIN2=	netstart pccard_ether rc.suspend rc.resume
40
41DEFAULTS= rc.conf pccard.conf periodic.conf
42
43MTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
44	BSD.var.dist BSD.x11.dist BSD.x11-4.dist
45.if !defined(NO_SENDMAIL)
46MTREE+=	BSD.sendmail.dist
47.endif
48
49NAMEDB=	PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
50	make-localhost
51
52PPPCNF=	ppp.conf
53
54ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
55	mailertable.sample aliases
56
57# Special top level files for FreeBSD
58FREEBSD=COPYRIGHT
59
60distribute:
61	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
62	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
63	    ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
64	    ${DISTDIR}/${DISTRIBUTION}/boot/device.hints
65
66distribution:
67	cd ${.CURDIR}; \
68	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
69		${BIN1} ${DESTDIR}/etc; \
70	    cap_mkdb ${DESTDIR}/etc/login.conf; \
71	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
72		${BIN2} ${DESTDIR}/etc; \
73	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
74		master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
75	    pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
76	cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
77	    ${DEFAULTS} ${DESTDIR}/etc/defaults
78	cd ${.CURDIR}/periodic; ${MAKE} install
79	cd ${.CURDIR}/rc.d; ${MAKE} install
80	cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
81	cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
82	cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
83	cd ${.CURDIR}/pam.d; ${MAKE} install
84.if !defined(NO_I4B)
85	cd ${.CURDIR}/isdn; ${MAKE} install
86.endif
87.if !defined(NO_SENDMAIL)
88	cd ${.CURDIR}/sendmail; ${MAKE} distribution
89.endif
90.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
91.if !defined(NO_OPENSSH)
92	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
93	    ${SSH} ${DESTDIR}/etc/ssh
94.endif
95	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
96	    ${SSL} ${DESTDIR}/etc/ssl
97.endif
98	cd ${.CURDIR}/root; \
99	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
100		dot.cshrc ${DESTDIR}/root/.cshrc; \
101	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
102		dot.klogin ${DESTDIR}/root/.klogin; \
103	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
104		dot.login ${DESTDIR}/root/.login; \
105	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
106		dot.profile ${DESTDIR}/root/.profile; \
107	    rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
108	    ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
109	    ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
110	cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
111	    ${MTREE} ${DESTDIR}/etc/mtree
112	cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
113	    ${NAMEDB} ${DESTDIR}/etc/namedb
114	cd ${.CURDIR}/ppp; ${INSTALL} -o root -g ${BINGRP} -m 600 \
115	    ${PPPCNF} ${DESTDIR}/etc/ppp
116	cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
117	    ${ETCMAIL} ${DESTDIR}/etc/mail
118	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
119	      ! -f ${DESTDIR}/etc/aliases ]; then \
120		set -x; \
121		ln -s mail/aliases ${DESTDIR}/etc/aliases; \
122	fi
123	${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
124	    ${DESTDIR}/etc/dumpdates
125	${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
126	    ${DESTDIR}/var/db/locate.database
127	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
128	    ${DESTDIR}/var/log/auth.log
129	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
130	    ${DESTDIR}/var/log/cron
131	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
132	    ${DESTDIR}/var/log/xferlog
133	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
134	    ${DESTDIR}/var/log/lpd-errs
135	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
136	    ${DESTDIR}/var/log/maillog
137	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
138	    ${DESTDIR}/var/log/lastlog
139	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
140	    ${DESTDIR}/var/log/messages
141	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
142	    ${DESTDIR}/var/log/security
143	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
144	    ${DESTDIR}/var/log/slip.log
145	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
146	    ${DESTDIR}/var/log/ppp.log
147	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
148	    ${DESTDIR}/var/log/wtmp
149	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
150	    ${DESTDIR}/var/run/utmp
151	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
152	    ${DESTDIR}/var/crash
153	cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
154		${FREEBSD} ${DESTDIR}/
155.if !defined(NOMAN)
156	cd ${.CURDIR}/../share/man; ${MAKE} makedb
157.endif
158
159distrib-dirs:
160	-set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
161	while [ $$# -gt 0 ] ; \
162	do \
163		for dir in /usr/share/locale \
164			   /usr/share/nls \
165			   /usr/local/share/nls; \
166		do \
167			test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
168			test -L "$$2" && rm -rf "$$2"; \
169			test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
170		done; \
171		shift; shift; \
172	done
173	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
174	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
175	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
176	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
177		-p ${DESTDIR}/usr/include
178.if !defined(NO_SENDMAIL)
179	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
180.endif
181	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
182	cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
183	cd ${DESTDIR}/usr/share/man; \
184	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
185	while [ $$# -gt 0 ] ; \
186	do \
187		rm -rf "$$1"; \
188		ln -s "$$2" "$$1"; \
189		shift; shift; \
190	done
191	cd ${DESTDIR}/usr/share/openssl/man; \
192	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
193	while [ $$# -gt 0 ] ; \
194	do \
195		rm -rf "$$1"; \
196		ln -s "$$2" "$$1"; \
197		shift; shift; \
198	done
199	cd ${DESTDIR}/usr/share/locale; \
200	set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
201	while [ $$# -gt 0 ] ; \
202	do \
203		rm -rf "$$1"; \
204		ln -s "$$2" "$$1"; \
205		shift; shift; \
206	done
207	cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
208	cd ${DESTDIR}/usr/share/nls; \
209	set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
210	while [ $$# -gt 0 ] ; \
211	do \
212		rm -rf "$$1"; \
213		ln -s "$$2" "$$1"; \
214		shift; shift; \
215	done
216
217etc-examples:
218	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
219	    ${BIN1} ${BIN2} nsmb.conf opieaccess \
220	    ${DESTDIR}/usr/share/examples/etc
221	cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
222	    ${DEFAULTS} ${DESTDIR}/usr/share/examples/etc/defaults
223
224.include <bsd.prog.mk>
225