Makefile revision 20403
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2#	$Id: Makefile,v 1.144 1996/12/13 10:24:42 jkh 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	${.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# Sendmail configuration file for release
38SENDMAILCF?=	freebsd.cf
39
40# Compatibility stuff, remove those links
41LATIN1LINKS = \
42	da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES fi_FI \
43	fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE nl_NL no_NO \
44	pt_PT sv_SE
45
46all depend etc install lint:
47
48distribute:
49	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/bin
50
51distribution:
52	(cd ${.CURDIR}; \
53	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc; \
54	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc; \
55	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN3} ${DESTDIR}/etc; \
56	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 crontab ${DESTDIR}/etc; \
57	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
58	    ${DESTDIR}/var/cron/log; \
59	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 \
60	    master.passwd ${DESTDIR}/etc; \
61	( cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall );\
62	( cd ${.CURDIR}/../gnu/libexec/uucp/sample; ${MAKE} install ); \
63	( cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ); \
64	( cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ); \
65	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; \
66	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
67	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev )
68	(cd ${DESTDIR}/dev; sh MAKEDEV all) ;
69	(cd ${.CURDIR}/root; \
70		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.cshrc \
71		    ${DESTDIR}/root/.cshrc; \
72		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.klogin \
73		    ${DESTDIR}/root/.klogin; \
74		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.login \
75		    ${DESTDIR}/root/.login; \
76		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.profile \
77		    ${DESTDIR}/root/.profile; \
78		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
79		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
80		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
81	cd ${.CURDIR}/mtree; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
82	    ${MTREE} ${DESTDIR}/etc/mtree
83	cd ${.CURDIR}/namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
84	    ${NAMEDB} ${DESTDIR}/etc/namedb
85	cd ${.CURDIR}/ppp; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
86	    ${PPPCNF} ${DESTDIR}/etc/ppp
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/slip.log
101	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
102	    ${DESTDIR}/var/log/ppp.log
103	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
104	    ${DESTDIR}/var/log/wtmp
105	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
106	    ${DESTDIR}/var/run/utmp
107	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${.CURDIR}/minfree \
108	    ${DESTDIR}/var/crash
109	(cd ${.CURDIR}/../usr.sbin/sendmail/src; \
110	    ${MAKE} obj; \
111	    ${MAKE} all; \
112	    ${MAKE} install; \
113	 cd ../cf/cf; \
114	    ${MAKE} objlink; \
115	    ${MAKE} ${SENDMAILCF}; \
116	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 obj/${SENDMAILCF} \
117		${DESTDIR}/etc/sendmail.cf)
118	(cd ${.CURDIR}/..; \
119	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} \
120		${DESTDIR}/)
121	(cd ${.CURDIR}/../share/man; ${MAKE} makedb; )
122
123distrib-dirs:
124	mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
125	mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
126# Compatibility stuff, remove obsoleted links, if exists
127	if [ -d	${DESTDIR}/usr/share/locale ] ;	\
128	then \
129		cd ${DESTDIR}/usr/share/locale;	\
130		for l in ${LATIN1LINKS}	; do \
131			if [ -h $$l.ISO_8859-1 ]; then \
132				rm $$l.ISO_8859-1; \
133			fi ; \
134		done; \
135	fi
136	mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
137	mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
138		-p ${DESTDIR}/usr/include
139.if defined(MAKE_LOCAL)
140	mtree -deU -f ${.CURDIR}/mtree/BSD.local.dist -p ${DESTDIR}/usr/local
141.endif
142	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
143	cd ${DESTDIR}/usr/share/locale; \
144	set - `cat ${.CURDIR}/locale.alias`; \
145	while [ $$# -gt 0 ] ; \
146	do \
147		rm -rf "$$1"; \
148		ln -s "$$2" "$$1"; \
149		shift; shift; \
150	done
151	cd ${DESTDIR}/usr/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.if defined(MAKE_LOCAL)
162	cd ${DESTDIR}/usr/local/share/nls; \
163	set - `cat ${.CURDIR}/locale.alias`; \
164	while [ $$# -gt 0 ] ; \
165	do \
166		rm -rf "$$1"; \
167		ln -s "$$2" "$$1"; \
168		shift; shift; \
169	done; \
170	rm -rf POSIX; \
171	ln -s C POSIX
172.endif
173
174.include <bsd.prog.mk>
175