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