#	@(#)Makefile	5.9 (Berkeley) 7/1/90

NOOBJ=	oobj

# disktab may be wrong -- hcx9 is a tahoe, but gets its own.
# -rw-r--r--
BIN1=	aliases amd-home amd-n changelist csh.cshrc csh.login csh.logout \
	crontab crontab.local daily dm.conf exports ftpusers \
	gettytab group hosts hosts.equiv hosts.lpd inetd.conf man.conf \
	monthly motd netstart phones printcap protocols rc \
	rc.local remote security services shells syslog.conf ttys weekly \
	etc.${MACHINE}/disktab

# -rw-rw-rw-
BIN2=	motd

MTREE=	4.4BSD.root 4.4BSD.usr 4.4BSD.var 4.4BSD.dist special
KRB=	README krb.conf krb.realms
NAMEDB=	localhost.rev named.boot root.cache
PCS=	pcs750.bin
WCS1=	wcs fppwcs poc poc1 poc2 fppoc
WCS2=	fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual
WCS3=	fstab ttys gettytab netstart

all clean cleandir depend etc install lint:

distribution:
	install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
	install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc
	install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
	pwd_mkdb -r "${DESTDIR}" -p ${DESTDIR}/etc/master.passwd
	install -c -o ${BINOWN} -g ${BINGRP} -m 555 etc.${MACHINE}/MAKEDEV \
	    ${DESTDIR}/dev
	(cd root; \
		install -c -o root -g wheel -m 644 dot.cshrc \
		    ${DESTDIR}/root/.cshrc; \
		install -c -o root -g wheel -m 644 dot.klogin \
		    ${DESTDIR}/root/.klogin; \
		install -c -o root -g wheel -m 644 dot.login \
		    ${DESTDIR}/root/.login; \
		install -c -o root -g wheel -m 644 dot.profile \
		    ${DESTDIR}/root/.profile; \
		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
	cd mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${MTREE} \
	    ${DESTDIR}/etc/mtree
	cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
	    ${DESTDIR}/etc/namedb
	rm -f ${DESTDIR}/etc/named.boot
	ln -s /etc/namedb/named.boot  ${DESTDIR}/etc/named.boot
	cd kerberosIV; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${KRB} \
	    ${DESTDIR}/etc/kerberosIV
	install -c -o ${BINOWN} -g operator -m 664 /dev/null \
	    ${DESTDIR}/etc/dumpdates
	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
	    ${DESTDIR}/etc/exports
	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
	    ${DESTDIR}/var/log/messages
	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
	    ${DESTDIR}/var/log/maillog
	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
	    ${DESTDIR}/var/log/lpd-errs
	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
	    ${DESTDIR}/var/log/wtmp
	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
	    ${DESTDIR}/var/run/utmp
	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
	    ${DESTDIR}/var/account/acct
	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
	    ${DESTDIR}/var/spool/uucp/ERRORS
.if ${MACHINE} == "tahoe"
	cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \
	    ${DESTDIR}/
.endif
.if ${MACHINE} == "vax"
	cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
	    ${DESTDIR}/
.endif
.if ${MACHINE} == "rt"
	cd etc.rt; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS3} \
	    ${DESTDIR}/etc
.endif
	# There are certain symbolic links we have to have, and
	# no other place to have install them.
	(cd ${DESTDIR}/ && rm -f sys && ln -s usr/src/sys sys)
	(cd ${DESTDIR}/etc && rm -f rmt && ln -s /usr/sbin/rmt rmt)
	(cd ${DESTDIR}/etc && rm -f termcap && ln -s /usr/share/misc/termcap termcap)
	(cd ${DESTDIR}/usr && rm -f X11 && ln -s X11R5 X11)
	(cd ${DESTDIR}/usr/bin && rm -f X11 && ln -s /usr/X11/bin X11)
	(cd ${DESTDIR}/usr/lib && rm -f X11 && ln -s /usr/X11/lib X11)
	(cd ${DESTDIR}/usr/include && rm -f X11 && ln -s /usr/X11/include X11)
	(cd ${DESTDIR}/usr/lib && rm -f tmac && ln -s /usr/share/tmac tmac)
	(cd ${DESTDIR}/usr/ucb && rm -f rdist && ln -s /usr/bin/rdist rdist)


hcx9-distribution:
	cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \
	    ${DESTDIR}/

.include <bsd.prog.mk>
