Makefile revision 1.88
11.88Slukem#	$NetBSD: Makefile,v 1.88 1998/09/05 14:48:38 lukem Exp $
21.66Smikel#	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
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.80Sjonathan# MD Makefile.inc may append MD targets to BIN[123].  Make sure all
121.80Sjonathan# are empty, to preserve the old semantics of setting them below with "=".
131.80SjonathanBIN1=	
141.80SjonathanBIN2=
151.80SjonathanBIN3=
161.80Sjonathan
171.71Scjs.if exists(etc.${MACHINE}/Makefile.inc)
181.71Scjs.include "etc.${MACHINE}/Makefile.inc"
191.71Scjs.endif
201.32Sjtc
211.21Scgd# -rw-r--r--
221.21ScgdBINOWN= root
231.21ScgdBINGRP= wheel
241.80SjonathanBIN1+=	aliases bootptab changelist csh.cshrc csh.login csh.logout daily \
251.65Smikel	daily.conf dm.conf floppytab ftpchroot ftpusers ftpwelcome \
261.84Sperry	gettytab group hosts hosts.lpd inetd.conf ld.so.conf lkm.conf \
271.75Smycroft	man.conf monthly monthly.conf mrouted.conf netstart networks \
281.76Smycroft	newsyslog.conf phones printcap profile protocols rbootd.conf rc \
291.74Sveego	rc.conf rc.lkm rc.local rc.subr remote rpc security security.conf \
301.74Sveego	services shells syslog.conf weekly weekly.conf etc.${MACHINE}/ttys \
311.60Smrg	etc.${MACHINE}/disktab
321.1Scgd
331.46Sderaadt# -rw-rw-r--
341.80SjonathanBIN2+=	motd
351.1Scgd
361.77Smycroft# -rw-------
371.80SjonathanBIN3+=	hosts.equiv
381.77Smycroft
391.1ScgdNAMEDB=	localhost.rev named.boot root.cache
401.1ScgdPCS=	pcs750.bin
411.1Scgd
421.88Slukemall clean cleandir depend distclean etc includes install lint:
431.1Scgd
441.34Scgd.ifndef DESTDIR
451.41Scgddistribution distrib-dirs snapshot:
461.36Scgd	@echo setenv DESTDIR before doing that!
471.34Scgd	@false
481.34Scgd.else
491.7Scgddistribution: distrib-dirs
501.87Sperry.if !defined(INSTALL_DONE)
511.53Scgd	(cd ..; ${MAKE} includes)
521.32Sjtc	(cd ..; ${MAKE} install)
531.87Sperry.endif
541.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
551.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc
561.77Smycroft	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 ${BIN3} ${DESTDIR}/etc
571.56Sthorpej	${INSTALL} -c -o root -g wheel -m 600 crontab \
581.56Sthorpej	    ${DESTDIR}/var/cron/tabs/root
591.56Sthorpej	${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
601.68Sperry	pwd_mkdb -p -d ${DESTDIR}/ ${DESTDIR}/etc/master.passwd
611.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
621.1Scgd	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
631.73Sperry	${INSTALL} -c -o root -g wheel -m 600 minfree \
641.73Sperry	    ${DESTDIR}/var/crash
651.1Scgd	(cd root; \
661.56Sthorpej		${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
671.1Scgd		    ${DESTDIR}/root/.cshrc; \
681.65Smikel		${INSTALL} -c -o root -g wheel -m 600 dot.klogin \
691.1Scgd		    ${DESTDIR}/root/.klogin; \
701.56Sthorpej		${INSTALL} -c -o root -g wheel -m 644 dot.login \
711.1Scgd		    ${DESTDIR}/root/.login; \
721.56Sthorpej		${INSTALL} -c -o root -g wheel -m 644 dot.profile \
731.1Scgd		    ${DESTDIR}/root/.profile; \
741.1Scgd		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
751.1Scgd		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
761.1Scgd		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
771.83Smrg	(cd mtree; ${MAKE} install)
781.63Smikel	(cd namedb; \
791.63Smikel		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
801.64Spk		    ${DESTDIR}/etc/namedb)
811.19Sderaadt	/bin/rm -f ${DESTDIR}/etc/localtime
821.19Sderaadt	ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
831.48Sderaadt	/bin/rm -f ${DESTDIR}/etc/rmt
841.48Sderaadt	ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
851.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
861.32Sjtc		${DESTDIR}/etc/dumpdates
871.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g operator -m 644 /dev/null \
881.44Sderaadt		${DESTDIR}/etc/skeykeys
891.56Sthorpej	${INSTALL} -c -o root -g wheel -m 600 /dev/null \
901.38Scgd		${DESTDIR}/var/cron/log
911.56Sthorpej	${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
921.32Sjtc		${DESTDIR}/var/db/locate.database
931.69Sperry	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
941.69Sperry		${DESTDIR}/var/log/authlog
951.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
961.32Sjtc		${DESTDIR}/var/log/lastlog
971.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
981.32Sjtc		${DESTDIR}/var/log/lpd-errs
991.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1001.32Sjtc		${DESTDIR}/var/log/maillog
1011.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
1021.32Sjtc		${DESTDIR}/var/log/messages
1031.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1041.58Slukem		${DESTDIR}/var/log/secure
1051.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
1061.32Sjtc		${DESTDIR}/var/log/wtmp
1071.69Sperry	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1081.69Sperry		${DESTDIR}/var/log/xferlog
1091.56Sthorpej	${INSTALL} -c -o daemon -g staff -m 664 /dev/null \
1101.39Scgd		${DESTDIR}/var/msgs/bounds
1111.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
1121.32Sjtc		${DESTDIR}/var/run/utmp
1131.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1141.81Smrg		${DESTDIR}/var/games/atc_scores
1151.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1161.81Smrg		${DESTDIR}/var/games/battlestar.log
1171.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1181.81Smrg		${DESTDIR}/var/games/cfscores
1191.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1201.82Sperry		${DESTDIR}/var/games/criblog
1211.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1221.81Smrg		${DESTDIR}/var/games/robots_roll
1231.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1241.81Smrg		${DESTDIR}/var/games/rogue.scores
1251.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1261.81Smrg		${DESTDIR}/var/games/saillog
1271.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1281.81Smrg		${DESTDIR}/var/games/snakerawscores
1291.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1301.81Smrg		${DESTDIR}/var/games/snake.log
1311.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1321.81Smrg		${DESTDIR}/var/games/tetris.scores
1331.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1341.81Smrg		${DESTDIR}/var/games/larn/llog12.0
1351.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1361.81Smrg		${DESTDIR}/var/games/larn/lscore12.0
1371.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1381.81Smrg		${DESTDIR}/var/games/larn/playerids
1391.56Sthorpej	(cd etc.${MACHINE}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
1401.6Scgd	    fstab.* ${DESTDIR}/etc)
1411.49Stls	(cd ${DESTDIR}/dev; ./MAKEDEV all)
1421.62Sperry	(cd ../usr.bin/mail; ${MAKE} distribution)
1431.35Scgd	(cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
1441.1Scgd
1451.1Scgd
1461.7Scgddistrib-dirs:
1471.56Sthorpej	${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}
1481.67Sperry	-mtree -def mtree/NetBSD.dist -p ${DESTDIR}/ -u
1491.28Sjtc	cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys
1501.41Scgd
1511.41Scgdsnapshot: distribution snap_pre snap_tar snap_md
1521.41Scgd	cd ${DESTDIR}/snapshot && cksum * > CKSUMS
1531.41Scgd
1541.41Scgdsnap_pre:
1551.41Scgd	/bin/rm -rf ${DESTDIR}/snapshot
1561.56Sthorpej	${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/snapshot
1571.41Scgd
1581.41Scgdsnap_tar:
1591.41Scgd	cd ${DESTDIR} && tar cf - bin | gzip -9 > snapshot/bin.tar.gz
1601.41Scgd	cd ${DESTDIR} && tar cf - dev | gzip -9 > snapshot/dev.tar.gz
1611.41Scgd	cd ${DESTDIR} && tar cf - .profile .cshrc etc mnt root sys tmp | \
1621.41Scgd	    gzip -9 > snapshot/etc.tar.gz
1631.41Scgd	cd ${DESTDIR} && tar cf - sbin | gzip -9 > snapshot/sbin.tar.gz
1641.41Scgd	cd ${DESTDIR} && tar cf - usr/bin | gzip -9 > snapshot/usr.bin.tar.gz
1651.41Scgd	cd ${DESTDIR} && tar cf - usr/games | gzip -9 > \
1661.41Scgd	    snapshot/usr.games.tar.gz
1671.41Scgd	cd ${DESTDIR} && tar cf - usr/include | gzip -9 > \
1681.41Scgd	    snapshot/usr.include.tar.gz
1691.41Scgd	cd ${DESTDIR} && tar cf - usr/lib | gzip -9 > snapshot/usr.lib.tar.gz
1701.41Scgd	cd ${DESTDIR} && tar cf - usr/libexec | gzip -9 > \
1711.41Scgd	    snapshot/usr.libexec.tar.gz
1721.51Spk	cd ${DESTDIR} && tar cf - usr/mdec usr/libdata usr/local usr/src \
1731.51Spk	    usr/obj | gzip -9 > snapshot/usr.misc.tar.gz
1741.41Scgd	cd ${DESTDIR} && tar cf - usr/sbin | gzip -9 > snapshot/usr.sbin.tar.gz
1751.41Scgd	cd ${DESTDIR} && tar cf - usr/share | gzip -9 > \
1761.41Scgd	    snapshot/usr.share.tar.gz
1771.41Scgd	cd ${DESTDIR} && tar cf - var | gzip -9 > snapshot/var.tar.gz
1781.41Scgd
1791.41Scgdsnap_md:
1801.41Scgd# nothing here -- look in the machine-dependent Makefile.inc
1811.41Scgd
1821.34Scgd.endif	# DESTDIR check
1831.7Scgd
1841.1Scgd.include <bsd.prog.mk>
185