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