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