Makefile revision 15027
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2#	$Id: Makefile,v 1.135 1996/03/22 17:28:07 nate Exp $
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.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
18# -rw-rw-rw-
19BIN2=	motd
20
21# -rwxr-xr-x root.wheel, for the new cron root.wheel
22BIN3=	daily weekly monthly pccard_ether
23
24MTREE=	BSD.local.dist BSD.root.dist BSD.usr.dist BSD.var.dist
25NAMEDB=	PROTO.localhost.rev named.boot named.root make-localhost
26PPPCNF= ppp.conf.filter.sample ppp.conf.iij ppp.conf.sample \
27	ppp.linkup.sample ppp.secret.sample
28
29# Special top level files for FreeBSD
30COPYRIGHT=	COPYRIGHT
31FREEBSD=
32FREEBSD+=	${COPYRIGHT}
33
34# Compatibility stuff, remove those links
35LATIN1LINKS = \
36	da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES fi_FI \
37	fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE nl_NL no_NO \
38	pt_PT sv_SE
39
40all depend etc install lint:
41
42distribute:
43	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/bin
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 666 ${BIN2} ${DESTDIR}/etc; \
49	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN3} ${DESTDIR}/etc; \
50	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 crontab ${DESTDIR}/etc; \
51	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
52	    ${DESTDIR}/var/cron/log; \
53	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 \
54	    master.passwd ${DESTDIR}/etc; \
55	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; \
56	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
57	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev )
58	(cd ${DESTDIR}/dev; sh MAKEDEV all) ;
59	(cd ${.CURDIR}/root; \
60		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.fvwmrc \
61		    ${DESTDIR}/root/.fvwmrc; \
62		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.Xdefaults \
63		    ${DESTDIR}/root/.Xdefaults; \
64		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.xsession \
65		    ${DESTDIR}/root/.xsession; \
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	${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 664 /dev/null \
98	    ${DESTDIR}/var/log/wtmp
99	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
100	    ${DESTDIR}/var/run/utmp
101	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${.CURDIR}/minfree \
102	    ${DESTDIR}/var/crash
103	(cd ${.CURDIR}/../usr.sbin/sendmail/src; \
104	    ${MAKE} obj; \
105	    ${MAKE} all; \
106	    ${MAKE} install; \
107	 cd ../cf/cf; \
108	    ${MAKE} obj; \
109	    ${MAKE} freebsd.cf; \
110	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 obj/freebsd.cf \
111		${DESTDIR}/etc/sendmail.cf)
112	(cd ${.CURDIR}/..; \
113	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} \
114		${DESTDIR}/)
115	(cd ${.CURDIR}/../share/man; ${MAKE} makedb; )
116
117distrib-dirs:
118	mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
119	mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
120# Compatibility stuff, remove obsoleted links, if exists
121	if [ -d	${DESTDIR}/usr/share/locale ] ;	\
122	then \
123		cd ${DESTDIR}/usr/share/locale;	\
124		for l in ${LATIN1LINKS}	; do \
125			if [ -h $$l.ISO_8859-1 ]; then \
126				rm $$l.ISO_8859-1; \
127			fi ; \
128		done; \
129	fi
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.if defined(MAKE_LOCAL)
134	mtree -deU -f ${.CURDIR}/mtree/BSD.local.dist -p ${DESTDIR}/usr/local
135.endif
136	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
137	cd ${DESTDIR}/usr/share/locale; \
138	set - `cat ${.CURDIR}/locale.alias`; \
139	while [ $$# -gt 0 ] ; \
140	do \
141		rm -rf "$$1"; \
142		ln -s "$$2" "$$1"; \
143		shift; shift; \
144	done
145	cd ${DESTDIR}/usr/share/nls; \
146	set - `cat ${.CURDIR}/locale.alias`; \
147	while [ $$# -gt 0 ] ; \
148	do \
149		rm -rf "$$1"; \
150		ln -s "$$2" "$$1"; \
151		shift; shift; \
152	done; \
153	rm -rf POSIX; \
154	ln -s C POSIX
155.if defined(MAKE_LOCAL)
156	cd ${DESTDIR}/usr/local/share/nls; \
157	set - `cat ${.CURDIR}/locale.alias`; \
158	while [ $$# -gt 0 ] ; \
159	do \
160		rm -rf "$$1"; \
161		ln -s "$$2" "$$1"; \
162		shift; shift; \
163	done; \
164	rm -rf POSIX; \
165	ln -s C POSIX
166.endif
167
168.include <bsd.prog.mk>
169