Makefile revision 65884
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2# $FreeBSD: head/etc/Makefile 65884 2000-09-15 08:07:05Z ache $
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}/../gnu/libexec/uucp/sample; ${MAKE} install ); \
74	( cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ); \
75	( cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ); \
76	( cd ${.CURDIR}/sendmail; ${MAKE} etc-sendmail.cf ); \
77	( cd ${.CURDIR}/isdn; ${MAKE} install ); \
78	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; \
79	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
80	     MAKEDEV.local MAKEDEV ${DESTDIR}/dev )
81.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSH)
82	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSH} \
83	    ${DESTDIR}/etc/ssh )
84.endif
85.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
86	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSL} \
87	    ${DESTDIR}/etc/ssl )
88.endif
89.if !defined(NO_MAKEDEV)
90	(cd ${DESTDIR}/dev; sh MAKEDEV all)
91.endif
92	(cd ${.CURDIR}/root; \
93		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.cshrc \
94		    ${DESTDIR}/root/.cshrc; \
95		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.klogin \
96		    ${DESTDIR}/root/.klogin; \
97		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.login \
98		    ${DESTDIR}/root/.login; \
99		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.profile \
100		    ${DESTDIR}/root/.profile; \
101		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
102		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
103		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
104	cd ${.CURDIR}/mtree; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
105	    ${MTREE} ${DESTDIR}/etc/mtree
106	cd ${.CURDIR}/namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
107	    ${NAMEDB} ${DESTDIR}/etc/namedb
108	cd ${.CURDIR}/ppp; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
109	    ${PPPCNF} ${DESTDIR}/etc/ppp
110	cd ${.CURDIR}/ppp; ${INSTALL} -c -o root -g ${BINGRP} -m 600 \
111	    ${PPPCF2} ${DESTDIR}/etc/ppp
112	cd ${.CURDIR}/mail; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
113	    ${ETCMAIL} ${DESTDIR}/etc/mail
114	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
115	      ! -f ${DESTDIR}/etc/aliases ]; then \
116		set -x; \
117		ln -s mail/aliases ${DESTDIR}/etc/aliases; \
118	fi
119	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
120	    ${DESTDIR}/etc/dumpdates
121	${INSTALL} -c -o nobody -g ${BINGRP} -m 644 /dev/null \
122	    ${DESTDIR}/var/db/locate.database
123	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
124	    ${DESTDIR}/var/log/lpd-errs
125	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
126	    ${DESTDIR}/var/log/maillog
127	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
128	    ${DESTDIR}/var/log/lastlog
129	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
130	    ${DESTDIR}/var/log/messages
131	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
132	    ${DESTDIR}/var/log/security
133	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
134	    ${DESTDIR}/var/log/slip.log
135	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
136	    ${DESTDIR}/var/log/ppp.log
137	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
138	    ${DESTDIR}/var/log/wtmp
139	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
140	    ${DESTDIR}/var/run/utmp
141	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
142	    ${DESTDIR}/var/crash
143	(cd ${.CURDIR}/..; \
144	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} \
145		${DESTDIR}/)
146.if !defined(NOMAN)
147	(cd ${.CURDIR}/../share/man; ${MAKE} makedb; )
148.endif
149
150distrib-dirs:
151	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
152	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
153	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
154	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
155		-p ${DESTDIR}/usr/include
156	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
157		-p ${DESTDIR}/usr/libdata/perl/5.6.0/mach
158	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
159	cd ${DESTDIR}/usr/share/locale; \
160	set - `cat ${.CURDIR}/locale.alias`; \
161	while [ $$# -gt 0 ] ; \
162	do \
163		rm -rf "$$1"; \
164		ln -s "$$2" "$$1"; \
165		shift; shift; \
166	done
167	cd ${DESTDIR}/usr/share/nls; \
168	set - `cat ${.CURDIR}/locale.alias`; \
169	while [ $$# -gt 0 ] ; \
170	do \
171		rm -rf "$$1"; \
172		ln -s "$$2" "$$1"; \
173		shift; shift; \
174	done; \
175	rm -rf POSIX; \
176	ln -s C POSIX
177
178etc-examples:
179	(cd ${.CURDIR}; \
180	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${BIN1} ${BIN2} \
181	    ${DESTDIR}/usr/share/examples/etc; \
182	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/rc.conf \
183	    ${DESTDIR}/usr/share/examples/etc/defaults; \
184	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/make.conf \
185	    ${DESTDIR}/usr/share/examples/etc/defaults; \
186	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/pccard.conf \
187	    ${DESTDIR}/usr/share/examples/etc/defaults; \
188	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/periodic.conf \
189	    ${DESTDIR}/usr/share/examples/etc/defaults)
190
191.include <bsd.prog.mk>
192