Makefile revision 23037
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2#	$Id$
3
4# -rw-r--r--
5BINOWN= root
6BINGRP= wheel
7BIN1=   aliases amd.map csh.cshrc csh.login csh.logout dm.conf \
8	ftpusers gettytab group hosts host.conf hosts.equiv hosts.lpd \
9	inetd.conf login.conf login.access motd modems netstart networks \
10	newsyslog.conf phones pccard.conf.sample printcap profile protocols \
11	rc rc.firewall rc.local rc.pccard rc.serial \
12	etc.${MACHINE}/rc.${MACHINE} \
13	remote security services sysconfig shells \
14	syslog.conf ttys etc.${MACHINE}/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# -rw-rw-rw-
20BIN2=	motd
21
22# -rwxr-xr-x root.wheel, for the new cron root.wheel
23BIN3=	daily weekly monthly pccard_ether
24
25MTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist BSD.var.dist
26NAMEDB=	PROTO.localhost.rev named.boot named.root make-localhost
27PPPCNF= ppp.conf.filter.sample ppp.conf.iij.sample ppp.conf.sample \
28	ppp.conf.server.sample ppp.dialup.sample ppp.linkup.sample \
29	ppp.pap.dialup.sample ppp.secret.sample
30
31
32# Special top level files for FreeBSD
33COPYRIGHT=	COPYRIGHT
34FREEBSD=
35FREEBSD+=	${COPYRIGHT}
36
37# Compatibility stuff, remove those links
38LATIN1LINKS = \
39	da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES fi_FI \
40	fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE nl_NL no_NO \
41	pt_PT sv_SE
42
43all depend etc install lint:
44
45distribute:
46	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/bin
47
48distribution:
49	(cd ${.CURDIR}; \
50	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc; \
51	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc; \
52	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN3} ${DESTDIR}/etc; \
53	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 crontab ${DESTDIR}/etc; \
54	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
55	    ${DESTDIR}/var/cron/log; \
56	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 \
57	    master.passwd ${DESTDIR}/etc; \
58	( cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall );\
59	( cd ${.CURDIR}/../gnu/libexec/uucp/sample; ${MAKE} install ); \
60	( cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ); \
61	( cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ); \
62	( cd ${.CURDIR}/../usr.sbin/sendmail/cf/cf; ${MAKE} etc-sendmail.cf ); \
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}/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	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
86	    ${DESTDIR}/etc/dumpdates
87	${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
88	    ${DESTDIR}/var/db/locate.database
89	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
90	    ${DESTDIR}/var/log/lpd-errs
91	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
92	    ${DESTDIR}/var/log/maillog
93	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
94	    ${DESTDIR}/var/log/lastlog
95	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
96	    ${DESTDIR}/var/log/messages
97	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
98	    ${DESTDIR}/var/log/slip.log
99	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
100	    ${DESTDIR}/var/log/ppp.log
101	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
102	    ${DESTDIR}/var/log/wtmp
103	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
104	    ${DESTDIR}/var/run/utmp
105	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${.CURDIR}/minfree \
106	    ${DESTDIR}/var/crash
107	(cd ${.CURDIR}/..; \
108	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} \
109		${DESTDIR}/)
110	(cd ${.CURDIR}/../share/man; ${MAKE} makedb; )
111
112distrib-dirs:
113	mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
114	mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
115# Compatibility stuff, remove obsoleted links, if exists
116	if [ -d	${DESTDIR}/usr/share/locale ] ;	\
117	then \
118		cd ${DESTDIR}/usr/share/locale;	\
119		for l in ${LATIN1LINKS}	; do \
120			if [ -h $$l.ISO_8859-1 ]; then \
121				rm $$l.ISO_8859-1; \
122			fi ; \
123		done; \
124	fi
125	mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
126	mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
127		-p ${DESTDIR}/usr/include
128.if defined(MAKE_LOCAL)
129	mtree -deU -f ${.CURDIR}/mtree/BSD.local.dist -p ${DESTDIR}/usr/local
130.endif
131	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
132	cd ${DESTDIR}/usr/share/locale; \
133	set - `cat ${.CURDIR}/locale.alias`; \
134	while [ $$# -gt 0 ] ; \
135	do \
136		rm -rf "$$1"; \
137		ln -s "$$2" "$$1"; \
138		shift; shift; \
139	done
140	cd ${DESTDIR}/usr/share/nls; \
141	set - `cat ${.CURDIR}/locale.alias`; \
142	while [ $$# -gt 0 ] ; \
143	do \
144		rm -rf "$$1"; \
145		ln -s "$$2" "$$1"; \
146		shift; shift; \
147	done; \
148	rm -rf POSIX; \
149	ln -s C POSIX
150.if defined(MAKE_LOCAL)
151	cd ${DESTDIR}/usr/local/share/nls; \
152	set - `cat ${.CURDIR}/locale.alias`; \
153	while [ $$# -gt 0 ] ; \
154	do \
155		rm -rf "$$1"; \
156		ln -s "$$2" "$$1"; \
157		shift; shift; \
158	done; \
159	rm -rf POSIX; \
160	ln -s C POSIX
161.endif
162
163.include <bsd.prog.mk>
164