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