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