Makefile revision 1.55
11.55Sperry#	$NetBSD: Makefile,v 1.55 1996/10/16 01:30:11 perry Exp $
21.24Smycroft#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
31.1Scgd
41.23ScgdTZDIR=		/usr/share/zoneinfo
51.19SderaadtLOCALTIME=	US/Pacific
61.19Sderaadt
71.55Sperry# setting NOOBJ prevents "make obj" from doing anything;
81.55Sperry# an objdir would break the installation stuff below
91.1ScgdNOOBJ=	oobj
101.1Scgd
111.32Sjtc.if exists(etc.${MACHINE}/Makefile.inc)
121.34Scgd.include "etc.${MACHINE}/Makefile.inc"
131.32Sjtc.endif
141.32Sjtc
151.21Scgd# -rw-r--r--
161.21ScgdBINOWN= root
171.21ScgdBINGRP= wheel
181.45ScgdBIN1=	aliases bootptab changelist csh.cshrc csh.login csh.logout daily \
191.45Scgd	dm.conf ftpusers ftpchroot gettytab group hosts hosts.equiv hosts.lpd \
201.52Smrg	inetd.conf man.conf monthly motd mrouted.conf myname netstart \
211.52Smrg	networks newsyslog.conf phones printcap protocols rbootd.conf rc \
221.52Smrg	rc.local remote rpc security services shells syslog.conf weekly \
231.52Smrg	etc.${MACHINE}/ttys etc.${MACHINE}/disktab
241.1Scgd
251.46Sderaadt# -rw-rw-r--
261.1ScgdBIN2=	motd
271.1Scgd
281.1ScgdNAMEDB=	localhost.rev named.boot root.cache
291.1ScgdPCS=	pcs750.bin
301.1Scgd
311.53Scgdall clean cleandir depend etc includes install lint:
321.1Scgd
331.34Scgd.ifndef DESTDIR
341.41Scgddistribution distrib-dirs snapshot:
351.36Scgd	@echo setenv DESTDIR before doing that!
361.34Scgd	@false
371.34Scgd.else
381.7Scgddistribution: distrib-dirs
391.53Scgd	(cd ..; ${MAKE} includes)
401.32Sjtc	(cd ..; ${MAKE} install)
411.21Scgd	install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
421.46Sderaadt	install -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc
431.3Sglass	install -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root
441.1Scgd	install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
451.32Sjtc	chroot ${DESTDIR}/ pwd_mkdb -p /etc/master.passwd
461.1Scgd	install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
471.1Scgd	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
481.1Scgd	(cd root; \
491.1Scgd		install -c -o root -g wheel -m 644 dot.cshrc \
501.1Scgd		    ${DESTDIR}/root/.cshrc; \
511.1Scgd		install -c -o root -g wheel -m 644 dot.klogin \
521.1Scgd		    ${DESTDIR}/root/.klogin; \
531.1Scgd		install -c -o root -g wheel -m 644 dot.login \
541.1Scgd		    ${DESTDIR}/root/.login; \
551.1Scgd		install -c -o root -g wheel -m 644 dot.profile \
561.1Scgd		    ${DESTDIR}/root/.profile; \
571.1Scgd		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
581.1Scgd		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
591.1Scgd		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
601.47Scgd	(cd mtree; \
611.47Scgd		install -c -o root -g wheel -m 600 special \
621.47Scgd		    ${DESTDIR}/etc/mtree; \
631.47Scgd		install -c -o root -g wheel -m 444 4.4BSD.dist \
641.47Scgd		    ${DESTDIR}/etc/mtree)
651.1Scgd	cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
661.1Scgd	    ${DESTDIR}/etc/namedb
671.19Sderaadt	/bin/rm -f ${DESTDIR}/etc/localtime
681.19Sderaadt	ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
691.48Sderaadt	/bin/rm -f ${DESTDIR}/etc/rmt
701.48Sderaadt	ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
711.1Scgd	install -c -o ${BINOWN} -g operator -m 664 /dev/null \
721.32Sjtc		${DESTDIR}/etc/dumpdates
731.44Sderaadt	install -c -o ${BINOWN} -g operator -m 644 /dev/null \
741.44Sderaadt		${DESTDIR}/etc/skeykeys
751.38Scgd	install -c -o root -g wheel -m 600 /dev/null \
761.38Scgd		${DESTDIR}/var/cron/log
771.16Scgd	install -c -o nobody -g ${BINGRP} -m 664 /dev/null \
781.32Sjtc		${DESTDIR}/var/db/locate.database
791.32Sjtc	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
801.32Sjtc		${DESTDIR}/var/log/lastlog
811.32Sjtc	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
821.32Sjtc		${DESTDIR}/var/log/lpd-errs
831.1Scgd	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
841.32Sjtc		${DESTDIR}/var/log/maillog
851.1Scgd	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
861.32Sjtc		${DESTDIR}/var/log/messages
871.1Scgd	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
881.32Sjtc		${DESTDIR}/var/log/wtmp
891.39Scgd	install -c -o daemon -g staff -m 664 /dev/null \
901.39Scgd		${DESTDIR}/var/msgs/bounds
911.1Scgd	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
921.32Sjtc		${DESTDIR}/var/run/utmp
931.1Scgd	(cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
941.6Scgd	    fstab.* ${DESTDIR}/etc)
951.49Stls	(cd ${DESTDIR}/dev; ./MAKEDEV all)
961.1Scgd.if ${MACHINE} == "vax"
971.1Scgd	(cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
981.1Scgd	    ${DESTDIR}/)
991.1Scgd.endif
1001.35Scgd	(cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
1011.1Scgd
1021.1Scgd
1031.7Scgddistrib-dirs:
1041.37Scgd	install -d -o root -g wheel -m 755 ${DESTDIR}
1051.47Scgd	-mtree -def mtree/4.4BSD.dist -p ${DESTDIR}/ -u
1061.28Sjtc	cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys
1071.41Scgd
1081.41Scgdsnapshot: distribution snap_pre snap_tar snap_md
1091.41Scgd	cd ${DESTDIR}/snapshot && cksum * > CKSUMS
1101.41Scgd
1111.41Scgdsnap_pre:
1121.41Scgd	/bin/rm -rf ${DESTDIR}/snapshot
1131.41Scgd	install -d -o root -g wheel -m 755 ${DESTDIR}/snapshot
1141.41Scgd
1151.41Scgdsnap_tar:
1161.41Scgd	cd ${DESTDIR} && tar cf - bin | gzip -9 > snapshot/bin.tar.gz
1171.41Scgd	cd ${DESTDIR} && tar cf - dev | gzip -9 > snapshot/dev.tar.gz
1181.41Scgd	cd ${DESTDIR} && tar cf - .profile .cshrc etc mnt root sys tmp | \
1191.41Scgd	    gzip -9 > snapshot/etc.tar.gz
1201.41Scgd	cd ${DESTDIR} && tar cf - sbin | gzip -9 > snapshot/sbin.tar.gz
1211.41Scgd	cd ${DESTDIR} && tar cf - usr/bin | gzip -9 > snapshot/usr.bin.tar.gz
1221.41Scgd	cd ${DESTDIR} && tar cf - usr/games | gzip -9 > \
1231.41Scgd	    snapshot/usr.games.tar.gz
1241.41Scgd	cd ${DESTDIR} && tar cf - usr/include | gzip -9 > \
1251.41Scgd	    snapshot/usr.include.tar.gz
1261.41Scgd	cd ${DESTDIR} && tar cf - usr/lib | gzip -9 > snapshot/usr.lib.tar.gz
1271.41Scgd	cd ${DESTDIR} && tar cf - usr/libexec | gzip -9 > \
1281.41Scgd	    snapshot/usr.libexec.tar.gz
1291.51Spk	cd ${DESTDIR} && tar cf - usr/mdec usr/libdata usr/local usr/src \
1301.51Spk	    usr/obj | gzip -9 > snapshot/usr.misc.tar.gz
1311.41Scgd	cd ${DESTDIR} && tar cf - usr/sbin | gzip -9 > snapshot/usr.sbin.tar.gz
1321.41Scgd	cd ${DESTDIR} && tar cf - usr/share | gzip -9 > \
1331.41Scgd	    snapshot/usr.share.tar.gz
1341.41Scgd	cd ${DESTDIR} && tar cf - var | gzip -9 > snapshot/var.tar.gz
1351.41Scgd
1361.41Scgdsnap_md:
1371.41Scgd# nothing here -- look in the machine-dependent Makefile.inc
1381.41Scgd
1391.34Scgd.endif	# DESTDIR check
1401.7Scgd
1411.1Scgd.include <bsd.prog.mk>
142