Makefile revision 1.93
11.93Sabs#	$NetBSD: Makefile,v 1.93 1999/01/06 06:08:37 abs Exp $
21.66Smikel#	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
31.1Scgd
41.91Stron# XXX: For NO_SENDMAIL and USE_BIND4
51.90Skim.include <bsd.own.mk>
61.90Skim
71.23ScgdTZDIR=		/usr/share/zoneinfo
81.90SkimLOCALTIME?=	US/Pacific
91.19Sderaadt
101.55Sperry# setting NOOBJ prevents "make obj" from doing anything;
111.55Sperry# an objdir would break the installation stuff below
121.1ScgdNOOBJ=	oobj
131.1Scgd
141.80Sjonathan# MD Makefile.inc may append MD targets to BIN[123].  Make sure all
151.80Sjonathan# are empty, to preserve the old semantics of setting them below with "=".
161.80SjonathanBIN1=	
171.80SjonathanBIN2=
181.80SjonathanBIN3=
191.80Sjonathan
201.71Scjs.if exists(etc.${MACHINE}/Makefile.inc)
211.71Scjs.include "etc.${MACHINE}/Makefile.inc"
221.71Scjs.endif
231.32Sjtc
241.21Scgd# -rw-r--r--
251.21ScgdBINOWN= root
261.21ScgdBINGRP= wheel
271.92SperryBIN1+=	aliases bootptab changelist csh.cshrc csh.login \
281.92Sperry	csh.logout daily daily.conf dm.conf floppytab ftpchroot \
291.92Sperry	ftpusers ftpwelcome gettytab group hosts hosts.lpd \
301.92Sperry	inetd.conf ld.so.conf lkm.conf mailer.conf man.conf \
311.92Sperry	monthly monthly.conf mrouted.conf netstart networks \
321.92Sperry	newsyslog.conf phones printcap profile protocols \
331.92Sperry	rbootd.conf rc rc.conf rc.lkm rc.local rc.subr \
341.92Sperry	rc.shutdown remote rpc security security.conf services \
351.92Sperry	shells syslog.conf weekly weekly.conf etc.${MACHINE}/ttys \
361.92Sperry	etc.${MACHINE}/disktab
371.1Scgd
381.46Sderaadt# -rw-rw-r--
391.80SjonathanBIN2+=	motd
401.1Scgd
411.77Smycroft# -rw-------
421.80SjonathanBIN3+=	hosts.equiv
431.77Smycroft
441.90SkimNAMEDB=	localhost.rev root.cache
451.91Stron.ifdef USE_BIND4
461.91StronNAMEDB+=	named.boot
471.91Stron.else
481.90SkimNAMEDB+=	named.conf
491.90Skim.endif
501.1ScgdPCS=	pcs750.bin
511.1Scgd
521.88Slukemall clean cleandir depend distclean etc includes install lint:
531.1Scgd
541.34Scgd.ifndef DESTDIR
551.41Scgddistribution distrib-dirs snapshot:
561.36Scgd	@echo setenv DESTDIR before doing that!
571.34Scgd	@false
581.34Scgd.else
591.7Scgddistribution: distrib-dirs
601.87Sperry.if !defined(INSTALL_DONE)
611.53Scgd	(cd ..; ${MAKE} includes)
621.32Sjtc	(cd ..; ${MAKE} install)
631.87Sperry.endif
641.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
651.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc
661.77Smycroft	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 ${BIN3} ${DESTDIR}/etc
671.56Sthorpej	${INSTALL} -c -o root -g wheel -m 600 crontab \
681.56Sthorpej	    ${DESTDIR}/var/cron/tabs/root
691.56Sthorpej	${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
701.68Sperry	pwd_mkdb -p -d ${DESTDIR}/ ${DESTDIR}/etc/master.passwd
711.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
721.1Scgd	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
731.73Sperry	${INSTALL} -c -o root -g wheel -m 600 minfree \
741.73Sperry	    ${DESTDIR}/var/crash
751.1Scgd	(cd root; \
761.56Sthorpej		${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
771.1Scgd		    ${DESTDIR}/root/.cshrc; \
781.65Smikel		${INSTALL} -c -o root -g wheel -m 600 dot.klogin \
791.1Scgd		    ${DESTDIR}/root/.klogin; \
801.56Sthorpej		${INSTALL} -c -o root -g wheel -m 644 dot.login \
811.1Scgd		    ${DESTDIR}/root/.login; \
821.56Sthorpej		${INSTALL} -c -o root -g wheel -m 644 dot.profile \
831.1Scgd		    ${DESTDIR}/root/.profile; \
841.1Scgd		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
851.1Scgd		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
861.1Scgd		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
871.83Smrg	(cd mtree; ${MAKE} install)
881.63Smikel	(cd namedb; \
891.63Smikel		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
901.64Spk		    ${DESTDIR}/etc/namedb)
911.19Sderaadt	/bin/rm -f ${DESTDIR}/etc/localtime
921.19Sderaadt	ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
931.48Sderaadt	/bin/rm -f ${DESTDIR}/etc/rmt
941.48Sderaadt	ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
951.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
961.32Sjtc		${DESTDIR}/etc/dumpdates
971.93Sabs	${INSTALL} -c -o ${BINOWN} -g operator -m 600 /dev/null \
981.44Sderaadt		${DESTDIR}/etc/skeykeys
991.56Sthorpej	${INSTALL} -c -o root -g wheel -m 600 /dev/null \
1001.38Scgd		${DESTDIR}/var/cron/log
1011.56Sthorpej	${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
1021.32Sjtc		${DESTDIR}/var/db/locate.database
1031.69Sperry	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1041.69Sperry		${DESTDIR}/var/log/authlog
1051.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
1061.32Sjtc		${DESTDIR}/var/log/lastlog
1071.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
1081.32Sjtc		${DESTDIR}/var/log/lpd-errs
1091.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1101.32Sjtc		${DESTDIR}/var/log/maillog
1111.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
1121.32Sjtc		${DESTDIR}/var/log/messages
1131.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1141.58Slukem		${DESTDIR}/var/log/secure
1151.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
1161.32Sjtc		${DESTDIR}/var/log/wtmp
1171.69Sperry	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1181.69Sperry		${DESTDIR}/var/log/xferlog
1191.56Sthorpej	${INSTALL} -c -o daemon -g staff -m 664 /dev/null \
1201.39Scgd		${DESTDIR}/var/msgs/bounds
1211.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
1221.32Sjtc		${DESTDIR}/var/run/utmp
1231.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1241.81Smrg		${DESTDIR}/var/games/atc_scores
1251.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1261.81Smrg		${DESTDIR}/var/games/battlestar.log
1271.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1281.81Smrg		${DESTDIR}/var/games/cfscores
1291.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1301.82Sperry		${DESTDIR}/var/games/criblog
1311.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1321.81Smrg		${DESTDIR}/var/games/robots_roll
1331.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1341.81Smrg		${DESTDIR}/var/games/rogue.scores
1351.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1361.81Smrg		${DESTDIR}/var/games/saillog
1371.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1381.81Smrg		${DESTDIR}/var/games/snakerawscores
1391.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1401.81Smrg		${DESTDIR}/var/games/snake.log
1411.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1421.81Smrg		${DESTDIR}/var/games/tetris.scores
1431.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1441.81Smrg		${DESTDIR}/var/games/larn/llog12.0
1451.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1461.81Smrg		${DESTDIR}/var/games/larn/lscore12.0
1471.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1481.81Smrg		${DESTDIR}/var/games/larn/playerids
1491.56Sthorpej	(cd etc.${MACHINE}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
1501.6Scgd	    fstab.* ${DESTDIR}/etc)
1511.49Stls	(cd ${DESTDIR}/dev; ./MAKEDEV all)
1521.62Sperry	(cd ../usr.bin/mail; ${MAKE} distribution)
1531.90Skim.ifndef NO_SENDMAIL
1541.35Scgd	(cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
1551.90Skim.endif
1561.1Scgd
1571.1Scgd
1581.7Scgddistrib-dirs:
1591.56Sthorpej	${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}
1601.67Sperry	-mtree -def mtree/NetBSD.dist -p ${DESTDIR}/ -u
1611.28Sjtc	cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys
1621.41Scgd
1631.41Scgdsnapshot: distribution snap_pre snap_tar snap_md
1641.41Scgd	cd ${DESTDIR}/snapshot && cksum * > CKSUMS
1651.41Scgd
1661.41Scgdsnap_pre:
1671.41Scgd	/bin/rm -rf ${DESTDIR}/snapshot
1681.56Sthorpej	${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/snapshot
1691.41Scgd
1701.41Scgdsnap_tar:
1711.41Scgd	cd ${DESTDIR} && tar cf - bin | gzip -9 > snapshot/bin.tar.gz
1721.41Scgd	cd ${DESTDIR} && tar cf - dev | gzip -9 > snapshot/dev.tar.gz
1731.41Scgd	cd ${DESTDIR} && tar cf - .profile .cshrc etc mnt root sys tmp | \
1741.41Scgd	    gzip -9 > snapshot/etc.tar.gz
1751.41Scgd	cd ${DESTDIR} && tar cf - sbin | gzip -9 > snapshot/sbin.tar.gz
1761.41Scgd	cd ${DESTDIR} && tar cf - usr/bin | gzip -9 > snapshot/usr.bin.tar.gz
1771.41Scgd	cd ${DESTDIR} && tar cf - usr/games | gzip -9 > \
1781.41Scgd	    snapshot/usr.games.tar.gz
1791.41Scgd	cd ${DESTDIR} && tar cf - usr/include | gzip -9 > \
1801.41Scgd	    snapshot/usr.include.tar.gz
1811.41Scgd	cd ${DESTDIR} && tar cf - usr/lib | gzip -9 > snapshot/usr.lib.tar.gz
1821.41Scgd	cd ${DESTDIR} && tar cf - usr/libexec | gzip -9 > \
1831.41Scgd	    snapshot/usr.libexec.tar.gz
1841.51Spk	cd ${DESTDIR} && tar cf - usr/mdec usr/libdata usr/local usr/src \
1851.51Spk	    usr/obj | gzip -9 > snapshot/usr.misc.tar.gz
1861.41Scgd	cd ${DESTDIR} && tar cf - usr/sbin | gzip -9 > snapshot/usr.sbin.tar.gz
1871.41Scgd	cd ${DESTDIR} && tar cf - usr/share | gzip -9 > \
1881.41Scgd	    snapshot/usr.share.tar.gz
1891.41Scgd	cd ${DESTDIR} && tar cf - var | gzip -9 > snapshot/var.tar.gz
1901.41Scgd
1911.41Scgdsnap_md:
1921.41Scgd# nothing here -- look in the machine-dependent Makefile.inc
1931.41Scgd
1941.34Scgd.endif	# DESTDIR check
1951.7Scgd
1961.1Scgd.include <bsd.prog.mk>
197