Makefile revision 95327
11193SN/A#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
213687Ssrastogi# $FreeBSD: head/etc/Makefile 95327 2002-04-23 22:16:41Z obrien $
31193SN/A
41193SN/A.if !defined(NO_SENDMAIL)
51193SN/ASUBDIR=	sendmail
61193SN/A.endif
72362SN/A
81193SN/ABIN1=   amd.map apmd.conf auth.conf \
92362SN/A	crontab csh.cshrc csh.login csh.logout \
101193SN/A	dhclient.conf dm.conf fbtab ftpusers gettytab group \
111193SN/A	hosts hosts.allow hosts.equiv hosts.lpd \
121193SN/A	inetd.conf login.access login.conf \
131193SN/A	motd modems netconfig networks newsyslog.conf \
141193SN/A	phones printcap profile protocols \
151193SN/A	rc rc.atm rc.devfs rc.diskless1 rc.diskless2 rc.firewall rc.firewall6 \
161193SN/A	rc.network rc.network6 rc.pccard rc.sendmail rc.serial rc.shutdown \
171193SN/A	rc.syscons rc.sysctl remote rpc services shells sysctl.conf \
181193SN/A	syslog.conf usbd.conf \
191193SN/A	etc.${MACHINE_ARCH}/disktab \
201193SN/A	etc.${MACHINE_ARCH}/rc.${MACHINE_ARCH} \
212362SN/A	etc.${MACHINE_ARCH}/ttys \
222362SN/A	${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
232362SN/A	${.CURDIR}/../usr.bin/mail/misc/mail.rc \
241193SN/A	${.CURDIR}/../usr.bin/locate/locate/locate.rc
251193SN/A
263793SN/A.if !defined(NO_I4B)
271193SN/ABIN1+=	rc.isdn
2813482Spsandoz.endif
2913482Spsandoz
3013482Spsandoz.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSH)
3113482SpsandozSSH=	${.CURDIR}/../crypto/openssh/ssh_config \
3210620Svlivanov	${.CURDIR}/../crypto/openssh/sshd_config \
335688SN/A	moduli
3410620Svlivanov.endif
355943SN/A
365688SN/A.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
373793SN/ASSL=	${.CURDIR}/../crypto/openssl/apps/openssl.cnf
385688SN/A.endif
3915453Sredestad
401193SN/A# -rwxr-xr-x root:wheel, for the new cron root:wheel
411193SN/ABIN2=	netstart pccard_ether rc.suspend rc.resume
421193SN/A
431193SN/AMTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
441193SN/A	BSD.var.dist BSD.x11.dist BSD.x11-4.dist
453792SN/A.if !defined(NO_SENDMAIL)
4610459SN/AMTREE+=	BSD.sendmail.dist
471193SN/A.endif
481193SN/ANAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
4910620Svlivanov	make-localhost
5010620SvlivanovPPPCNF= ppp.conf
5110620SvlivanovETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
5210620Svlivanov	mailertable.sample aliases
5310620Svlivanov
5410620Svlivanov
5510620Svlivanov# Special top level files for FreeBSD
5610620SvlivanovCOPYRIGHT=	COPYRIGHT
573240SN/AFREEBSD=
581193SN/AFREEBSD+=	${COPYRIGHT}
591193SN/A
601193SN/Aetc:
613528SN/A
621193SN/Adistribute:
631193SN/A	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
641193SN/A.if defined(OBJFORMAT)
653792SN/A	echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/${DISTRIBUTION}/etc/objformat
6610620Svlivanov.endif
671193SN/A	@echo
688310SN/A
6910620Svlivanovdistribution:
7010620Svlivanov	(cd ${.CURDIR}; \
7110620Svlivanov	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc; \
7210620Svlivanov	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN2} ${DESTDIR}/etc; \
7310620Svlivanov	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/rc.conf ${DESTDIR}/etc/defaults/; \
7410620Svlivanov	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/pccard.conf ${DESTDIR}/etc/defaults/; \
7510620Svlivanov	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/periodic.conf ${DESTDIR}/etc/defaults/; \
7610620Svlivanov	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
771193SN/A	    ${DESTDIR}/var/log/cron; \
781193SN/A	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 \
7910620Svlivanov	    master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
8010620Svlivanov	( cd ${.CURDIR}/periodic; ${MAKE} install ); \
811193SN/A	( cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ); \
8210620Svlivanov	( cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ); \
8310620Svlivanov	( cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ); \
8410620Svlivanov	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; )
8510620Svlivanov	( cd ${.CURDIR}/pam.d; ${MAKE} install )
8610620Svlivanov.if !defined(NO_I4B)
8710620Svlivanov	( cd ${.CURDIR}/isdn; ${MAKE} install )
8810620Svlivanov.endif
8910620Svlivanov.if !defined(NO_SENDMAIL)
9010620Svlivanov	( cd ${.CURDIR}/sendmail; ${MAKE} distribution );
9110620Svlivanov.endif
9210620Svlivanov.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSH)
9310620Svlivanov	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSH} \
9410620Svlivanov	    ${DESTDIR}/etc/ssh )
9510620Svlivanov.endif
9610620Svlivanov.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
9714075Spsandoz	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSL} \
9814075Spsandoz	    ${DESTDIR}/etc/ssl )
9914448Spsandoz.endif
10014075Spsandoz.if !defined(NO_MAKEDEV_INSTALL)
10114075Spsandoz	( cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
10214075Spsandoz	     MAKEDEV.local MAKEDEV ${DESTDIR}/dev )
10314075Spsandoz.if !defined(NO_MAKEDEV_RUN)
10414448Spsandoz	(cd ${DESTDIR}/dev; sh MAKEDEV all)
10514075Spsandoz.endif
10614075Spsandoz.endif
10710620Svlivanov	(cd ${.CURDIR}/root; \
10810620Svlivanov		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.cshrc \
10910620Svlivanov		    ${DESTDIR}/root/.cshrc; \
11010620Svlivanov		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.klogin \
11110620Svlivanov		    ${DESTDIR}/root/.klogin; \
11210620Svlivanov		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.login \
11310620Svlivanov		    ${DESTDIR}/root/.login; \
11410620Svlivanov		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.profile \
11510620Svlivanov		    ${DESTDIR}/root/.profile; \
1161193SN/A		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
1171193SN/A		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
1188310SN/A		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
1198310SN/A	cd ${.CURDIR}/mtree; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
1208310SN/A	    ${MTREE} ${DESTDIR}/etc/mtree
1218310SN/A	cd ${.CURDIR}/namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
1228310SN/A	    ${NAMEDB} ${DESTDIR}/etc/namedb
1238310SN/A	cd ${.CURDIR}/ppp; ${INSTALL} -c -o root -g ${BINGRP} -m 600 \
1248310SN/A	    ${PPPCNF} ${DESTDIR}/etc/ppp
12510623Svlivanov	cd ${.CURDIR}/mail; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
1265688SN/A	    ${ETCMAIL} ${DESTDIR}/etc/mail
1278310SN/A	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
1284251SN/A	      ! -f ${DESTDIR}/etc/aliases ]; then \
1294251SN/A		set -x; \
1304251SN/A		ln -s mail/aliases ${DESTDIR}/etc/aliases; \
13114448Spsandoz	fi
13214075Spsandoz	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
13314075Spsandoz	    ${DESTDIR}/etc/dumpdates
13414075Spsandoz	${INSTALL} -c -o nobody -g ${BINGRP} -m 644 /dev/null \
13514448Spsandoz	    ${DESTDIR}/var/db/locate.database
13614075Spsandoz	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
13714075Spsandoz	    ${DESTDIR}/var/log/auth.log
13814075Spsandoz	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
13914156Spsandoz	    ${DESTDIR}/var/log/lpd-errs
14014075Spsandoz	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
14114075Spsandoz	    ${DESTDIR}/var/log/maillog
14214075Spsandoz	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
14314075Spsandoz	    ${DESTDIR}/var/log/lastlog
14414075Spsandoz	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
14514075Spsandoz	    ${DESTDIR}/var/log/messages
1468310SN/A	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1478310SN/A	    ${DESTDIR}/var/log/security
1488310SN/A	${INSTALL} -c -o ${BINOWN} -g network -m 640 /dev/null \
1498310SN/A	    ${DESTDIR}/var/log/slip.log
1508310SN/A	${INSTALL} -c -o ${BINOWN} -g network -m 640 /dev/null \
1518310SN/A	    ${DESTDIR}/var/log/ppp.log
1528310SN/A	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
1538310SN/A	    ${DESTDIR}/var/log/wtmp
1548310SN/A	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
1558310SN/A	    ${DESTDIR}/var/run/utmp
1568310SN/A	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
1578310SN/A	    ${DESTDIR}/var/crash
1585688SN/A	(cd ${.CURDIR}/..; \
1595688SN/A	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} \
1608310SN/A		${DESTDIR}/)
1615688SN/A.if !defined(NOMAN)
1628310SN/A	(cd ${.CURDIR}/../share/man; ${MAKE} makedb; )
1635688SN/A.endif
1645688SN/A
1655688SN/Adistrib-dirs:
1665688SN/A	-set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
1675688SN/A	while [ $$# -gt 0 ] ; \
1685688SN/A	do \
1695688SN/A		for dir in /usr/share/locale \
1705688SN/A			   /usr/share/nls \
1715688SN/A			   /usr/local/share/nls; \
1725688SN/A		do \
1735688SN/A			test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
1745688SN/A			test -L "$$2" && rm -rf "$$2"; \
17514075Spsandoz			test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
17614075Spsandoz		done; \
17714075Spsandoz		shift; shift; \
17814075Spsandoz	done
17914075Spsandoz	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
18014075Spsandoz	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
18114075Spsandoz	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
18214075Spsandoz	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
18314075Spsandoz		-p ${DESTDIR}/usr/include
18414075Spsandoz	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
18510620Svlivanov		-p ${DESTDIR}/usr/libdata/perl/5.6.1/mach
18610620Svlivanov.if !defined(NO_SENDMAIL)
18710620Svlivanov	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
18810620Svlivanov.endif
18910620Svlivanov	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
19010620Svlivanov	cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
19110620Svlivanov	cd ${DESTDIR}/usr/share/man; \
19210620Svlivanov	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
19310620Svlivanov	while [ $$# -gt 0 ] ; \
19410620Svlivanov	do \
19510620Svlivanov		rm -rf "$$1"; \
19610620Svlivanov		ln -s "$$2" "$$1"; \
19710620Svlivanov		shift; shift; \
19810620Svlivanov	done
19910620Svlivanov	cd ${DESTDIR}/usr/share/locale; \
20010620Svlivanov	set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
20110620Svlivanov	while [ $$# -gt 0 ] ; \
20210620Svlivanov	do \
20310620Svlivanov		rm -rf "$$1"; \
20410620Svlivanov		ln -s "$$2" "$$1"; \
20510620Svlivanov		shift; shift; \
20610620Svlivanov	done
20710620Svlivanov	cd ${DESTDIR}/usr/share/nls; \
2083239SN/A	set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
2093239SN/A	while [ $$# -gt 0 ] ; \
21010620Svlivanov	do \
21110620Svlivanov		rm -rf "$$1"; \
21210620Svlivanov		ln -s "$$2" "$$1"; \
21310620Svlivanov		shift; shift; \
21410620Svlivanov	done
21510620Svlivanov
21610620Svlivanovetc-examples:
21710620Svlivanov	(cd ${.CURDIR}; \
2185774SN/A	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${BIN1} ${BIN2} \
21910620Svlivanov	    opieaccess ${DESTDIR}/usr/share/examples/etc; \
22010620Svlivanov	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/rc.conf \
2213240SN/A	    ${DESTDIR}/usr/share/examples/etc/defaults; \
2223240SN/A	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/pccard.conf \
2231193SN/A	    ${DESTDIR}/usr/share/examples/etc/defaults; \
2241193SN/A	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/periodic.conf \
2251193SN/A	    ${DESTDIR}/usr/share/examples/etc/defaults)
2265688SN/A
2278310SN/A.include <bsd.prog.mk>
2288310SN/A