Makefile revision 73251
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2# $FreeBSD: head/etc/Makefile 73251 2001-03-01 03:51:18Z gshapiro $
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	dhclient.conf dm.conf fbtab ftpusers gettytab group \
11	hosts hosts.allow hosts.equiv hosts.lpd \
12	inetd.conf login.access login.conf \
13	motd modems networks newsyslog.conf \
14	pam.conf phones pim6dd.conf pim6sd.conf \
15	printcap profile protocols \
16	rc rc.atm rc.devfs rc.diskless1 rc.diskless2 rc.firewall rc.firewall6 \
17	rc.isdn rc.network rc.network6 rc.pccard rc.serial rc.shutdown \
18	rc.syscons rc.sysctl remote rpc security services shells syslog.conf \
19	usbd.conf \
20	etc.${MACHINE_ARCH}/disktab \
21	etc.${MACHINE_ARCH}/rc.${MACHINE_ARCH} \
22	etc.${MACHINE_ARCH}/ttys \
23	${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
24	${.CURDIR}/../usr.bin/mail/misc/mail.rc \
25	${.CURDIR}/../usr.bin/locate/locate/locate.rc
26
27.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSH)
28SSH=	${.CURDIR}/../crypto/openssh/ssh_config \
29	${.CURDIR}/../crypto/openssh/sshd_config
30.endif
31
32.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
33SSL=	${.CURDIR}/../crypto/openssl/apps/openssl.cnf
34.endif
35
36# -rwxr-xr-x root.wheel, for the new cron root.wheel
37BIN2=	netstart pccard_ether rc.suspend rc.resume
38
39MTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
40	BSD.var.dist BSD.x11.dist BSD.x11-4.dist
41NAMEDB= PROTO.localhost.rev named.conf named.root make-localhost
42PPPCNF= ppp.deny ppp.shells.sample
43PPPCF2= ppp.conf
44ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
45	mailertable.sample aliases
46
47
48# Special top level files for FreeBSD
49COPYRIGHT=	COPYRIGHT
50FREEBSD=
51FREEBSD+=	${COPYRIGHT}
52
53etc:
54
55distribute:
56	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/bin
57.if defined(OBJFORMAT)
58	echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/bin/etc/objformat
59.endif
60	@echo 
61
62distribution:
63	(cd ${.CURDIR}; \
64	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc; \
65	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN2} ${DESTDIR}/etc; \
66	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/rc.conf ${DESTDIR}/etc/defaults/; \
67	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/make.conf ${DESTDIR}/etc/defaults/; \
68	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/pccard.conf ${DESTDIR}/etc/defaults/; \
69	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/periodic.conf ${DESTDIR}/etc/defaults/; \
70	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
71	    ${DESTDIR}/var/log/cron; \
72	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 \
73	    master.passwd ${DESTDIR}/etc; \
74	( cd ${.CURDIR}/periodic; ${MAKE} install ); \
75	( cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ); \
76	( cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ); \
77	( cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ); \
78	( cd ${.CURDIR}/isdn; ${MAKE} install ); \
79	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; \
80	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
81	     MAKEDEV.local MAKEDEV ${DESTDIR}/dev )
82.if !defined(NO_SENDMAIL)
83	( cd ${.CURDIR}/sendmail; ${MAKE} distribution );
84.endif
85.if !defined(NOUUCP)
86	( cd ${.CURDIR}/../gnu/libexec/uucp/sample; ${MAKE} install )
87.endif
88.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSH)
89	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSH} \
90	    ${DESTDIR}/etc/ssh )
91.endif
92.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
93	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSL} \
94	    ${DESTDIR}/etc/ssl )
95.endif
96.if !defined(NO_MAKEDEV)
97	(cd ${DESTDIR}/dev; sh MAKEDEV all)
98.endif
99	(cd ${.CURDIR}/root; \
100		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.cshrc \
101		    ${DESTDIR}/root/.cshrc; \
102		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.klogin \
103		    ${DESTDIR}/root/.klogin; \
104		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.login \
105		    ${DESTDIR}/root/.login; \
106		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.profile \
107		    ${DESTDIR}/root/.profile; \
108		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
109		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
110		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
111	cd ${.CURDIR}/mtree; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
112	    ${MTREE} ${DESTDIR}/etc/mtree
113	cd ${.CURDIR}/namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
114	    ${NAMEDB} ${DESTDIR}/etc/namedb
115	cd ${.CURDIR}/ppp; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
116	    ${PPPCNF} ${DESTDIR}/etc/ppp
117	cd ${.CURDIR}/ppp; ${INSTALL} -c -o root -g ${BINGRP} -m 600 \
118	    ${PPPCF2} ${DESTDIR}/etc/ppp
119	cd ${.CURDIR}/mail; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
120	    ${ETCMAIL} ${DESTDIR}/etc/mail
121	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
122	      ! -f ${DESTDIR}/etc/aliases ]; then \
123		set -x; \
124		ln -s mail/aliases ${DESTDIR}/etc/aliases; \
125	fi
126	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
127	    ${DESTDIR}/etc/dumpdates
128	${INSTALL} -c -o nobody -g ${BINGRP} -m 644 /dev/null \
129	    ${DESTDIR}/var/db/locate.database
130	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
131	    ${DESTDIR}/var/log/lpd-errs
132	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
133	    ${DESTDIR}/var/log/maillog
134	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
135	    ${DESTDIR}/var/log/lastlog
136	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
137	    ${DESTDIR}/var/log/messages
138	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
139	    ${DESTDIR}/var/log/security
140	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
141	    ${DESTDIR}/var/log/slip.log
142	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
143	    ${DESTDIR}/var/log/ppp.log
144	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
145	    ${DESTDIR}/var/log/wtmp
146	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
147	    ${DESTDIR}/var/run/utmp
148	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
149	    ${DESTDIR}/var/crash
150	(cd ${.CURDIR}/..; \
151	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} \
152		${DESTDIR}/)
153.if !defined(NOMAN)
154	(cd ${.CURDIR}/../share/man; ${MAKE} makedb; )
155.endif
156
157distrib-dirs:
158	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
159	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
160	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
161	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
162		-p ${DESTDIR}/usr/include
163	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
164		-p ${DESTDIR}/usr/libdata/perl/5.6.0/mach
165	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
166	cd ${DESTDIR}/usr/share/man/en.ISO_8859-1; ln -sf ../man* .
167	cd ${DESTDIR}/usr/share/locale; \
168	set - `cat ${.CURDIR}/locale.alias`; \
169	while [ $$# -gt 0 ] ; \
170	do \
171		rm -rf "$$1"; \
172		ln -s "$$2" "$$1"; \
173		shift; shift; \
174	done
175	cd ${DESTDIR}/usr/share/nls; \
176	set - `cat ${.CURDIR}/locale.alias`; \
177	while [ $$# -gt 0 ] ; \
178	do \
179		rm -rf "$$1"; \
180		ln -s "$$2" "$$1"; \
181		shift; shift; \
182	done; \
183	rm -rf POSIX; \
184	ln -s C POSIX
185
186etc-examples:
187	(cd ${.CURDIR}; \
188	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${BIN1} ${BIN2} \
189	    ${DESTDIR}/usr/share/examples/etc; \
190	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/rc.conf \
191	    ${DESTDIR}/usr/share/examples/etc/defaults; \
192	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/make.conf \
193	    ${DESTDIR}/usr/share/examples/etc/defaults; \
194	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/pccard.conf \
195	    ${DESTDIR}/usr/share/examples/etc/defaults; \
196	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/periodic.conf \
197	    ${DESTDIR}/usr/share/examples/etc/defaults)
198
199.include <bsd.prog.mk>
200