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