Makefile revision 114492
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2# $FreeBSD: head/etc/Makefile 114492 2003-05-02 05:27:35Z dougb $
3
4.if !defined(NO_SENDMAIL)
5SUBDIR=	sendmail
6.endif
7
8BIN1=	amd.map apmd.conf auth.conf \
9	crontab csh.cshrc csh.login csh.logout \
10	devd.conf dhclient.conf disktab fbtab ftpusers gettytab group \
11	hosts hosts.allow hosts.equiv hosts.lpd \
12	inetd.conf login.access login.conf \
13	mac.conf motd netconfig network.subr networks newsyslog.conf \
14	phones printcap profile protocols \
15	rc rc.firewall rc.firewall6 rc.shutdown \
16	rc.subr remote rpc services \
17	shells sysctl.conf syslog.conf usbd.conf \
18	etc.${MACHINE_ARCH}/ttys \
19	${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
20	${.CURDIR}/../usr.bin/mail/misc/mail.rc \
21	${.CURDIR}/../usr.bin/locate/locate/locate.rc
22
23.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
24.if !defined(NO_OPENSSH)
25SSH=	${.CURDIR}/../crypto/openssh/ssh_config \
26	${.CURDIR}/../crypto/openssh/sshd_config \
27	moduli
28.endif
29SSL=	${.CURDIR}/../crypto/openssl/apps/openssl.cnf
30.endif
31
32# -rwxr-xr-x root:wheel, for the new cron root:wheel
33BIN2=	netstart pccard_ether rc.suspend rc.resume
34
35DEFAULTS= rc.conf pccard.conf periodic.conf
36
37MTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
38	BSD.var.dist BSD.x11.dist BSD.x11-4.dist
39.if !defined(NO_SENDMAIL)
40MTREE+=	BSD.sendmail.dist
41.endif
42
43NAMEDB=	PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
44	make-localhost
45
46PPPCNF=	ppp.conf
47
48ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
49	mailertable.sample aliases
50
51# Special top level files for FreeBSD
52FREEBSD=COPYRIGHT
53
54distribute:
55	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
56	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
57	    ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
58	    ${DISTDIR}/${DISTRIBUTION}/boot/device.hints
59
60distribution:
61	cd ${.CURDIR}; \
62	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
63		${BIN1} ${DESTDIR}/etc; \
64	    cap_mkdb ${DESTDIR}/etc/login.conf; \
65	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
66		${BIN2} ${DESTDIR}/etc; \
67	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
68		master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
69	    pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
70	cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
71	    ${DEFAULTS} ${DESTDIR}/etc/defaults
72	cd ${.CURDIR}/periodic; ${MAKE} install
73	cd ${.CURDIR}/rc.d; ${MAKE} install
74	cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
75	cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
76	cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
77	cd ${.CURDIR}/pam.d; ${MAKE} install
78.if !defined(NO_I4B)
79	cd ${.CURDIR}/isdn; ${MAKE} install
80.endif
81.if !defined(NO_SENDMAIL)
82	cd ${.CURDIR}/sendmail; ${MAKE} distribution
83.endif
84.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
85.if !defined(NO_OPENSSH)
86	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
87	    ${SSH} ${DESTDIR}/etc/ssh
88.endif
89	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
90	    ${SSL} ${DESTDIR}/etc/ssl
91.endif
92	cd ${.CURDIR}/root; \
93	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
94		dot.cshrc ${DESTDIR}/root/.cshrc; \
95	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
96		dot.k5login ${DESTDIR}/root/.k5login; \
97	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
98		dot.login ${DESTDIR}/root/.login; \
99	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
100		dot.profile ${DESTDIR}/root/.profile; \
101	    rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
102	    ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
103	    ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
104	cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
105	    ${MTREE} ${DESTDIR}/etc/mtree
106	cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
107	    ${NAMEDB} ${DESTDIR}/etc/namedb
108	cd ${.CURDIR}/ppp; ${INSTALL} -o root -g ${BINGRP} -m 600 \
109	    ${PPPCNF} ${DESTDIR}/etc/ppp
110	cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
111	    ${ETCMAIL} ${DESTDIR}/etc/mail
112	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
113	      ! -f ${DESTDIR}/etc/aliases ]; then \
114		set -x; \
115		ln -s mail/aliases ${DESTDIR}/etc/aliases; \
116	fi
117	${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
118	    ${DESTDIR}/etc/dumpdates
119	${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
120	    ${DESTDIR}/var/db/locate.database
121	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
122	    ${DESTDIR}/var/log/auth.log
123	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
124	    ${DESTDIR}/var/log/cron
125	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
126	    ${DESTDIR}/var/log/debug.log
127	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
128	    ${DESTDIR}/var/log/xferlog
129	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
130	    ${DESTDIR}/var/log/lpd-errs
131	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
132	    ${DESTDIR}/var/log/maillog
133	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
134	    ${DESTDIR}/var/log/lastlog
135	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
136	    ${DESTDIR}/var/log/messages
137	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
138	    ${DESTDIR}/var/log/security
139	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
140	    ${DESTDIR}/var/log/slip.log
141	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
142	    ${DESTDIR}/var/log/ppp.log
143	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
144	    ${DESTDIR}/var/log/wtmp
145	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
146	    ${DESTDIR}/var/run/utmp
147	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
148	    ${DESTDIR}/var/crash
149	cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
150		${FREEBSD} ${DESTDIR}/
151.if !defined(NOMAN)
152	cd ${.CURDIR}/../share/man; ${MAKE} makedb
153.endif
154
155distrib-dirs:
156	-set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
157	while [ $$# -gt 0 ] ; \
158	do \
159		for dir in /usr/share/locale \
160			   /usr/share/nls \
161			   /usr/local/share/nls; \
162		do \
163			test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
164			test -L "$$2" && rm -rf "$$2"; \
165			test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
166		done; \
167		shift; shift; \
168	done
169	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
170	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
171	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
172	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
173		-p ${DESTDIR}/usr/include
174.if !defined(NO_SENDMAIL)
175	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
176.endif
177	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
178	cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
179	cd ${DESTDIR}/usr/share/man; \
180	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
181	while [ $$# -gt 0 ] ; \
182	do \
183		rm -rf "$$1"; \
184		ln -s "$$2" "$$1"; \
185		shift; shift; \
186	done
187	cd ${DESTDIR}/usr/share/openssl/man; \
188	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
189	while [ $$# -gt 0 ] ; \
190	do \
191		rm -rf "$$1"; \
192		ln -s "$$2" "$$1"; \
193		shift; shift; \
194	done
195	cd ${DESTDIR}/usr/share/locale; \
196	set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
197	while [ $$# -gt 0 ] ; \
198	do \
199		rm -rf "$$1"; \
200		ln -s "$$2" "$$1"; \
201		shift; shift; \
202	done
203	cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
204	cd ${DESTDIR}/usr/share/nls; \
205	set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
206	while [ $$# -gt 0 ] ; \
207	do \
208		rm -rf "$$1"; \
209		ln -s "$$2" "$$1"; \
210		shift; shift; \
211	done
212
213etc-examples:
214	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
215	    ${BIN1} ${BIN2} nsmb.conf opieaccess \
216	    ${DESTDIR}/usr/share/examples/etc
217	cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
218	    ${DEFAULTS} ${DESTDIR}/usr/share/examples/etc/defaults
219
220.include <bsd.prog.mk>
221