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