Makefile revision 43803
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2#	$Id: Makefile,v 1.188 1999/01/25 18:24:46 dillon Exp $
3
4SUBDIR=	sendmail
5
6BIN1=   aliases amd.map crontab csh.cshrc csh.login csh.logout dm.conf \
7	fbtab ftpusers gettytab group hosts host.conf hosts.equiv hosts.lpd \
8	inetd.conf auth.conf login.conf login.access motd modems networks \
9	newsyslog.conf pam.conf phones pccard.conf.sample \
10	printcap profile protocols \
11	rc rc.atm rc.conf rc.devfs rc.firewall rc.isdn rc.network rc.pccard \
12	rc.diskless1 rc.diskless2 rc.serial rc.shutdown \
13	etc.${MACHINE_ARCH}/rc.${MACHINE_ARCH} \
14	remote security services shells syslog.conf \
15	etc.${MACHINE_ARCH}/ttys 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
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.conf.sample ppp.linkup.sample ppp.linkdown.sample \
27	ppp.secret.sample ppp.deny ppp.shells.sample
28NOSPAM=	Makefile README sendmail.cf.additions
29
30
31# Special top level files for FreeBSD
32COPYRIGHT=	COPYRIGHT
33FREEBSD=
34FREEBSD+=	${COPYRIGHT}
35
36# Compatibility stuff, remove those links
37LATIN1LINKS = \
38	da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES fi_FI \
39	fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE nl_NL no_NO \
40	pt_PT sv_SE
41
42etc:
43
44distribute:
45	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/bin
46.if defined(OBJFORMAT)
47	echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/bin/etc/objformat
48.endif
49	@echo 
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 755 ${BIN2} ${DESTDIR}/etc; \
55	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
56	    ${DESTDIR}/var/cron/log; \
57	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 \
58	    master.passwd ${DESTDIR}/etc; \
59	( cd ${.CURDIR}/periodic; ${MAKE} install );\
60	( cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall );\
61	( cd ${.CURDIR}/../gnu/libexec/uucp/sample; ${MAKE} install ); \
62	( cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ); \
63	( cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ); \
64	( cd ${.CURDIR}/sendmail; ${MAKE} etc-sendmail.cf ); \
65	( cd ${.CURDIR}/isdn; ${MAKE} install );\
66	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; \
67	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
68	     MAKEDEV.local etc.${MACHINE_ARCH}/MAKEDEV ${DESTDIR}/dev )
69	(cd ${DESTDIR}/dev; sh MAKEDEV all) ;
70	(cd ${.CURDIR}/root; \
71		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.cshrc \
72		    ${DESTDIR}/root/.cshrc; \
73		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.klogin \
74		    ${DESTDIR}/root/.klogin; \
75		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.login \
76		    ${DESTDIR}/root/.login; \
77		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.profile \
78		    ${DESTDIR}/root/.profile; \
79		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
80		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
81		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
82	cd ${.CURDIR}/mtree; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
83	    ${MTREE} ${DESTDIR}/etc/mtree
84	cd ${.CURDIR}/namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
85	    ${NAMEDB} ${DESTDIR}/etc/namedb
86	cd ${.CURDIR}/ppp; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
87	    ${PPPCNF} ${DESTDIR}/etc/ppp
88	cd ${.CURDIR}/mail; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
89	    ${NOSPAM} ${DESTDIR}/etc/mail
90	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
91	    ${DESTDIR}/etc/dumpdates
92	${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
93	    ${DESTDIR}/var/db/locate.database
94	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
95	    ${DESTDIR}/var/log/lpd-errs
96	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
97	    ${DESTDIR}/var/log/maillog
98	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
99	    ${DESTDIR}/var/log/lastlog
100	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
101	    ${DESTDIR}/var/log/messages
102	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
103	    ${DESTDIR}/var/log/slip.log
104	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
105	    ${DESTDIR}/var/log/ppp.log
106	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
107	    ${DESTDIR}/var/log/wtmp
108	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
109	    ${DESTDIR}/var/run/utmp
110	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${.CURDIR}/minfree \
111	    ${DESTDIR}/var/crash
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	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
134	cd ${DESTDIR}/usr/share/locale; \
135	set - `cat ${.CURDIR}/locale.alias`; \
136	while [ $$# -gt 0 ] ; \
137	do \
138		rm -rf "$$1"; \
139		ln -s "$$2" "$$1"; \
140		shift; shift; \
141	done
142	cd ${DESTDIR}/usr/share/nls; \
143	set - `cat ${.CURDIR}/locale.alias`; \
144	while [ $$# -gt 0 ] ; \
145	do \
146		rm -rf "$$1"; \
147		ln -s "$$2" "$$1"; \
148		shift; shift; \
149	done; \
150	rm -rf POSIX; \
151	ln -s C POSIX
152
153.include <bsd.prog.mk>
154