Makefile revision 98548
11195Srgrimes#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
250472Speter# $FreeBSD: head/etc/Makefile 98548 2002-06-21 08:54:03Z ru $
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 \
1798187Sgordon	rc.subr rc.syscons rc.sysctl remote rpc services \
1898187Sgordon	shells sysctl.conf 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
3098548Sru.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
3198548Sru.if !defined(NO_OPENSSH)
3257488SpeterSSH=	${.CURDIR}/../crypto/openssh/ssh_config \
3374837Sgreen	${.CURDIR}/../crypto/openssh/sshd_config \
3492898Sdes	moduli
3557459Smarkm.endif
3660677SkrisSSL=	${.CURDIR}/../crypto/openssl/apps/openssl.cnf
3760677Skris.endif
3860677Skris
3982521Salex# -rwxr-xr-x root:wheel, for the new cron root:wheel
4048734SiwasakiBIN2=	netstart pccard_ether rc.suspend rc.resume
41147Srgrimes
4227487SasamiMTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
4365168Sasami	BSD.var.dist BSD.x11.dist BSD.x11-4.dist
4495144Sgshapiro.if !defined(NO_SENDMAIL)
4595144SgshapiroMTREE+=	BSD.sendmail.dist
4695144Sgshapiro.endif
4790281SumeNAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
4890281Sume	make-localhost
4989936ScjcPPPCNF= ppp.conf
5064598SgshapiroETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
5164598Sgshapiro	mailertable.sample aliases
5237Srgrimes
5317639Swosch
54263Srgrimes# Special top level files for FreeBSD
552779SrgrimesCOPYRIGHT=	COPYRIGHT
568857SrgrimesFREEBSD=
57993SrgrimesFREEBSD+=	${COPYRIGHT}
58263Srgrimes
5938103Speteretc:
6037Srgrimes
614487Sphkdistribute:
6295327Sobrien	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
6339590Sjkh.if defined(OBJFORMAT)
6495327Sobrien	echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/${DISTRIBUTION}/etc/objformat
6539590Sjkh.endif
6695509Sru	${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
6795509Sru	    ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
6895509Sru	    ${DISTDIR}/${DISTRIBUTION}/boot/device.hints
695948Sjkh
704487Sphkdistribution:
711759Sjkh	(cd ${.CURDIR}; \
729970Sbde	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc; \
7336902Sguido	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN2} ${DESTDIR}/etc; \
7443832Sjkh	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/rc.conf ${DESTDIR}/etc/defaults/; \
7558979Siwasaki	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/pccard.conf ${DESTDIR}/etc/defaults/; \
7661981Sbrian	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/periodic.conf ${DESTDIR}/etc/defaults/; \
779970Sbde	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
7851033Sn_hibma	    ${DESTDIR}/var/log/cron; \
799970Sbde	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 \
8088878Ssheldonh	    master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
8157488Speter	( cd ${.CURDIR}/periodic; ${MAKE} install ); \
8298187Sgordon	( cd ${.CURDIR}/rc.d; ${MAKE} install ); \
8357488Speter	( cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ); \
8417639Swosch	( cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ); \
8517645Swosch	( cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ); \
8674194Sdes	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; )
8787447Sdes	( cd ${.CURDIR}/pam.d; ${MAKE} install )
8877041Sru.if !defined(NO_I4B)
8977041Sru	( cd ${.CURDIR}/isdn; ${MAKE} install )
9077041Sru.endif
9173251Sgshapiro.if !defined(NO_SENDMAIL)
9273251Sgshapiro	( cd ${.CURDIR}/sendmail; ${MAKE} distribution );
9373251Sgshapiro.endif
9498548Sru.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
9598548Sru.if !defined(NO_OPENSSH)
9657488Speter	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSH} \
9757488Speter	    ${DESTDIR}/etc/ssh )
9857488Speter.endif
9960677Skris	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSL} \
10060677Skris	    ${DESTDIR}/etc/ssl )
10160677Skris.endif
10274990Sasmodai.if !defined(NO_MAKEDEV_INSTALL)
10374194Sdes	( cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
10474194Sdes	     MAKEDEV.local MAKEDEV ${DESTDIR}/dev )
10574990Sasmodai.if !defined(NO_MAKEDEV_RUN)
10657488Speter	(cd ${DESTDIR}/dev; sh MAKEDEV all)
10757071Srwatson.endif
10874990Sasmodai.endif
1091731Sjkh	(cd ${.CURDIR}/root; \
1109970Sbde		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.cshrc \
11137Srgrimes		    ${DESTDIR}/root/.cshrc; \
1129970Sbde		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.klogin \
11337Srgrimes		    ${DESTDIR}/root/.klogin; \
1149970Sbde		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.login \
11537Srgrimes		    ${DESTDIR}/root/.login; \
1169970Sbde		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.profile \
11737Srgrimes		    ${DESTDIR}/root/.profile; \
11837Srgrimes		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
11937Srgrimes		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
12037Srgrimes		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
1219970Sbde	cd ${.CURDIR}/mtree; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
1221731Sjkh	    ${MTREE} ${DESTDIR}/etc/mtree
1239970Sbde	cd ${.CURDIR}/namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
1241731Sjkh	    ${NAMEDB} ${DESTDIR}/etc/namedb
12589936Scjc	cd ${.CURDIR}/ppp; ${INSTALL} -c -o root -g ${BINGRP} -m 600 \
1266177Samurai	    ${PPPCNF} ${DESTDIR}/etc/ppp
12730589Sjmb	cd ${.CURDIR}/mail; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
12864598Sgshapiro	    ${ETCMAIL} ${DESTDIR}/etc/mail
12964629Sgshapiro	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
13064629Sgshapiro	      ! -f ${DESTDIR}/etc/aliases ]; then \
13164629Sgshapiro		set -x; \
13264629Sgshapiro		ln -s mail/aliases ${DESTDIR}/etc/aliases; \
13364629Sgshapiro	fi
1349970Sbde	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
13537Srgrimes	    ${DESTDIR}/etc/dumpdates
13663097Speter	${INSTALL} -c -o nobody -g ${BINGRP} -m 644 /dev/null \
137147Srgrimes	    ${DESTDIR}/var/db/locate.database
13892099Srwatson	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
13992100Srwatson	    ${DESTDIR}/var/log/auth.log
14063097Speter	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
141147Srgrimes	    ${DESTDIR}/var/log/lpd-errs
14283561Sjlemon	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
14337Srgrimes	    ${DESTDIR}/var/log/maillog
14463097Speter	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
145288Srgrimes	    ${DESTDIR}/var/log/lastlog
14663097Speter	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
147147Srgrimes	    ${DESTDIR}/var/log/messages
14813378Sache	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
14950126Sgreen	    ${DESTDIR}/var/log/security
15082866Sbrian	${INSTALL} -c -o ${BINOWN} -g network -m 640 /dev/null \
15113378Sache	    ${DESTDIR}/var/log/slip.log
15282866Sbrian	${INSTALL} -c -o ${BINOWN} -g network -m 640 /dev/null \
15317104Spst	    ${DESTDIR}/var/log/ppp.log
15463097Speter	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
155147Srgrimes	    ${DESTDIR}/var/log/wtmp
15663097Speter	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
15737Srgrimes	    ${DESTDIR}/var/run/utmp
15864665Skris	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
1591759Sjkh	    ${DESTDIR}/var/crash
1601759Sjkh	(cd ${.CURDIR}/..; \
1619970Sbde	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} \
1629970Sbde		${DESTDIR}/)
16361888Sasmodai.if !defined(NOMAN)
1641759Sjkh	(cd ${.CURDIR}/../share/man; ${MAKE} makedb; )
16561888Sasmodai.endif
16637Srgrimes
167147Srgrimesdistrib-dirs:
16889074Sphantom	-set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
16989074Sphantom	while [ $$# -gt 0 ] ; \
17089074Sphantom	do \
17189074Sphantom		for dir in /usr/share/locale \
17289074Sphantom			   /usr/share/nls \
17389074Sphantom			   /usr/local/share/nls; \
17489074Sphantom		do \
17589074Sphantom			test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
17689074Sphantom			test -L "$$2" && rm -rf "$$2"; \
17789074Sphantom			test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
17889074Sphantom		done; \
17989074Sphantom		shift; shift; \
18089074Sphantom	done
18165884Sache	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
18265884Sache	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
18365884Sache	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
18465884Sache	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
1857129Srgrimes		-p ${DESTDIR}/usr/include
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