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