Makefile revision 95327
11195Srgrimes#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
250472Speter# $FreeBSD: head/etc/Makefile 95327 2002-04-23 22:16:41Z obrien $
337Srgrimes
473251Sgshapiro.if !defined(NO_SENDMAIL)
538103SpeterSUBDIR=	sendmail
673251Sgshapiro.endif
738103Speter
864618SgshapiroBIN1=   amd.map apmd.conf auth.conf \
955230Speter	crontab csh.cshrc csh.login csh.logout \
1082480Sbrian	dhclient.conf dm.conf fbtab ftpusers gettytab group \
1165532Snectar	hosts hosts.allow hosts.equiv hosts.lpd \
1255230Speter	inetd.conf login.access login.conf \
1388878Ssheldonh	motd modems netconfig networks newsyslog.conf \
1489364Sdes	phones printcap profile protocols \
1567929Sume	rc rc.atm rc.devfs rc.diskless1 rc.diskless2 rc.firewall rc.firewall6 \
1695227Sgshapiro	rc.network rc.network6 rc.pccard rc.sendmail rc.serial rc.shutdown \
1787514Scjc	rc.syscons rc.sysctl remote rpc services shells sysctl.conf \
1875703Ssobomax	syslog.conf usbd.conf \
1955230Speter	etc.${MACHINE_ARCH}/disktab \
2055230Speter	etc.${MACHINE_ARCH}/rc.${MACHINE_ARCH} \
2155230Speter	etc.${MACHINE_ARCH}/ttys \
221734Sjkh	${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
2317639Swosch	${.CURDIR}/../usr.bin/mail/misc/mail.rc \
2417639Swosch	${.CURDIR}/../usr.bin/locate/locate/locate.rc
2537Srgrimes
2677041Sru.if !defined(NO_I4B)
2777041SruBIN1+=	rc.isdn
2877041Sru.endif
2977041Sru
3057479Speter.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSH)
3157488SpeterSSH=	${.CURDIR}/../crypto/openssh/ssh_config \
3274837Sgreen	${.CURDIR}/../crypto/openssh/sshd_config \
3392898Sdes	moduli
3457459Smarkm.endif
3557459Smarkm
3660677Skris.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
3760677SkrisSSL=	${.CURDIR}/../crypto/openssl/apps/openssl.cnf
3860677Skris.endif
3960677Skris
4082521Salex# -rwxr-xr-x root:wheel, for the new cron root:wheel
4148734SiwasakiBIN2=	netstart pccard_ether rc.suspend rc.resume
42147Srgrimes
4327487SasamiMTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
4465168Sasami	BSD.var.dist BSD.x11.dist BSD.x11-4.dist
4595144Sgshapiro.if !defined(NO_SENDMAIL)
4695144SgshapiroMTREE+=	BSD.sendmail.dist
4795144Sgshapiro.endif
4890281SumeNAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
4990281Sume	make-localhost
5089936ScjcPPPCNF= ppp.conf
5164598SgshapiroETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
5264598Sgshapiro	mailertable.sample aliases
5337Srgrimes
5417639Swosch
55263Srgrimes# Special top level files for FreeBSD
562779SrgrimesCOPYRIGHT=	COPYRIGHT
578857SrgrimesFREEBSD=
58993SrgrimesFREEBSD+=	${COPYRIGHT}
59263Srgrimes
6038103Speteretc:
6137Srgrimes
624487Sphkdistribute:
6395327Sobrien	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
6439590Sjkh.if defined(OBJFORMAT)
6595327Sobrien	echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/${DISTRIBUTION}/etc/objformat
6639590Sjkh.endif
6794694Sdougb	@echo
685948Sjkh
694487Sphkdistribution:
701759Sjkh	(cd ${.CURDIR}; \
719970Sbde	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc; \
7236902Sguido	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN2} ${DESTDIR}/etc; \
7343832Sjkh	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/rc.conf ${DESTDIR}/etc/defaults/; \
7458979Siwasaki	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/pccard.conf ${DESTDIR}/etc/defaults/; \
7561981Sbrian	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/periodic.conf ${DESTDIR}/etc/defaults/; \
769970Sbde	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
7751033Sn_hibma	    ${DESTDIR}/var/log/cron; \
789970Sbde	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 \
7988878Ssheldonh	    master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
8057488Speter	( cd ${.CURDIR}/periodic; ${MAKE} install ); \
8157488Speter	( cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ); \
8217639Swosch	( cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ); \
8317645Swosch	( cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ); \
8474194Sdes	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; )
8587447Sdes	( cd ${.CURDIR}/pam.d; ${MAKE} install )
8677041Sru.if !defined(NO_I4B)
8777041Sru	( cd ${.CURDIR}/isdn; ${MAKE} install )
8877041Sru.endif
8973251Sgshapiro.if !defined(NO_SENDMAIL)
9073251Sgshapiro	( cd ${.CURDIR}/sendmail; ${MAKE} distribution );
9173251Sgshapiro.endif
9257488Speter.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSH)
9357488Speter	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSH} \
9457488Speter	    ${DESTDIR}/etc/ssh )
9557488Speter.endif
9660677Skris.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
9760677Skris	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSL} \
9860677Skris	    ${DESTDIR}/etc/ssl )
9960677Skris.endif
10074990Sasmodai.if !defined(NO_MAKEDEV_INSTALL)
10174194Sdes	( cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
10274194Sdes	     MAKEDEV.local MAKEDEV ${DESTDIR}/dev )
10374990Sasmodai.if !defined(NO_MAKEDEV_RUN)
10457488Speter	(cd ${DESTDIR}/dev; sh MAKEDEV all)
10557071Srwatson.endif
10674990Sasmodai.endif
1071731Sjkh	(cd ${.CURDIR}/root; \
1089970Sbde		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.cshrc \
10937Srgrimes		    ${DESTDIR}/root/.cshrc; \
1109970Sbde		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.klogin \
11137Srgrimes		    ${DESTDIR}/root/.klogin; \
1129970Sbde		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.login \
11337Srgrimes		    ${DESTDIR}/root/.login; \
1149970Sbde		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.profile \
11537Srgrimes		    ${DESTDIR}/root/.profile; \
11637Srgrimes		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
11737Srgrimes		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
11837Srgrimes		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
1199970Sbde	cd ${.CURDIR}/mtree; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
1201731Sjkh	    ${MTREE} ${DESTDIR}/etc/mtree
1219970Sbde	cd ${.CURDIR}/namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
1221731Sjkh	    ${NAMEDB} ${DESTDIR}/etc/namedb
12389936Scjc	cd ${.CURDIR}/ppp; ${INSTALL} -c -o root -g ${BINGRP} -m 600 \
1246177Samurai	    ${PPPCNF} ${DESTDIR}/etc/ppp
12530589Sjmb	cd ${.CURDIR}/mail; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
12664598Sgshapiro	    ${ETCMAIL} ${DESTDIR}/etc/mail
12764629Sgshapiro	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
12864629Sgshapiro	      ! -f ${DESTDIR}/etc/aliases ]; then \
12964629Sgshapiro		set -x; \
13064629Sgshapiro		ln -s mail/aliases ${DESTDIR}/etc/aliases; \
13164629Sgshapiro	fi
1329970Sbde	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
13337Srgrimes	    ${DESTDIR}/etc/dumpdates
13463097Speter	${INSTALL} -c -o nobody -g ${BINGRP} -m 644 /dev/null \
135147Srgrimes	    ${DESTDIR}/var/db/locate.database
13692099Srwatson	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
13792100Srwatson	    ${DESTDIR}/var/log/auth.log
13863097Speter	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
139147Srgrimes	    ${DESTDIR}/var/log/lpd-errs
14083561Sjlemon	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
14137Srgrimes	    ${DESTDIR}/var/log/maillog
14263097Speter	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
143288Srgrimes	    ${DESTDIR}/var/log/lastlog
14463097Speter	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
145147Srgrimes	    ${DESTDIR}/var/log/messages
14613378Sache	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
14750126Sgreen	    ${DESTDIR}/var/log/security
14882866Sbrian	${INSTALL} -c -o ${BINOWN} -g network -m 640 /dev/null \
14913378Sache	    ${DESTDIR}/var/log/slip.log
15082866Sbrian	${INSTALL} -c -o ${BINOWN} -g network -m 640 /dev/null \
15117104Spst	    ${DESTDIR}/var/log/ppp.log
15263097Speter	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
153147Srgrimes	    ${DESTDIR}/var/log/wtmp
15463097Speter	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
15537Srgrimes	    ${DESTDIR}/var/run/utmp
15664665Skris	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
1571759Sjkh	    ${DESTDIR}/var/crash
1581759Sjkh	(cd ${.CURDIR}/..; \
1599970Sbde	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} \
1609970Sbde		${DESTDIR}/)
16161888Sasmodai.if !defined(NOMAN)
1621759Sjkh	(cd ${.CURDIR}/../share/man; ${MAKE} makedb; )
16361888Sasmodai.endif
16437Srgrimes
165147Srgrimesdistrib-dirs:
16689074Sphantom	-set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
16789074Sphantom	while [ $$# -gt 0 ] ; \
16889074Sphantom	do \
16989074Sphantom		for dir in /usr/share/locale \
17089074Sphantom			   /usr/share/nls \
17189074Sphantom			   /usr/local/share/nls; \
17289074Sphantom		do \
17389074Sphantom			test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
17489074Sphantom			test -L "$$2" && rm -rf "$$2"; \
17589074Sphantom			test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
17689074Sphantom		done; \
17789074Sphantom		shift; shift; \
17889074Sphantom	done
17965884Sache	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
18065884Sache	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
18165884Sache	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
18265884Sache	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
1837129Srgrimes		-p ${DESTDIR}/usr/include
18465884Sache	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
18592452Smarkm		-p ${DESTDIR}/usr/libdata/perl/5.6.1/mach
18695144Sgshapiro.if !defined(NO_SENDMAIL)
18795144Sgshapiro	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
18895144Sgshapiro.endif
189410Srgrimes	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
19077993Sache	cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
19177993Sache	cd ${DESTDIR}/usr/share/man; \
19277993Sache	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
19377993Sache	while [ $$# -gt 0 ] ; \
19477993Sache	do \
19577993Sache		rm -rf "$$1"; \
19677993Sache		ln -s "$$2" "$$1"; \
19777993Sache		shift; shift; \
19877993Sache	done
1997129Srgrimes	cd ${DESTDIR}/usr/share/locale; \
20077976Sache	set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
20111635Sache	while [ $$# -gt 0 ] ; \
20211635Sache	do \
20311635Sache		rm -rf "$$1"; \
20411635Sache		ln -s "$$2" "$$1"; \
20511635Sache		shift; shift; \
2067129Srgrimes	done
20711635Sache	cd ${DESTDIR}/usr/share/nls; \
20877999Sache	set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
20911635Sache	while [ $$# -gt 0 ] ; \
21011635Sache	do \
21111635Sache		rm -rf "$$1"; \
21211635Sache		ln -s "$$2" "$$1"; \
21311635Sache		shift; shift; \
21477999Sache	done
215147Srgrimes
21648185Ssheldonhetc-examples:
21748185Ssheldonh	(cd ${.CURDIR}; \
21848185Ssheldonh	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${BIN1} ${BIN2} \
21981656Sache	    opieaccess ${DESTDIR}/usr/share/examples/etc; \
22048185Ssheldonh	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/rc.conf \
22152609Sdillon	    ${DESTDIR}/usr/share/examples/etc/defaults; \
22258979Siwasaki	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/pccard.conf \
22362006Snbm	    ${DESTDIR}/usr/share/examples/etc/defaults; \
22461981Sbrian	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/periodic.conf \
22548185Ssheldonh	    ${DESTDIR}/usr/share/examples/etc/defaults)
22648185Ssheldonh
22737Srgrimes.include <bsd.prog.mk>
228