Makefile revision 1.91
11.91Stron#	$NetBSD: Makefile,v 1.91 1998/11/19 19:53:33 tron 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.80SjonathanBIN1+=	aliases bootptab changelist csh.cshrc csh.login csh.logout daily \
281.65Smikel	daily.conf dm.conf floppytab ftpchroot ftpusers ftpwelcome \
291.84Sperry	gettytab group hosts hosts.lpd inetd.conf ld.so.conf lkm.conf \
301.75Smycroft	man.conf monthly monthly.conf mrouted.conf netstart networks \
311.76Smycroft	newsyslog.conf phones printcap profile protocols rbootd.conf rc \
321.89Sbad	rc.conf rc.lkm rc.local rc.subr rc.shutdown remote rpc security \
331.89Sbad	security.conf services shells syslog.conf weekly weekly.conf \
341.89Sbad	etc.${MACHINE}/ttys etc.${MACHINE}/disktab
351.1Scgd
361.46Sderaadt# -rw-rw-r--
371.80SjonathanBIN2+=	motd
381.1Scgd
391.77Smycroft# -rw-------
401.80SjonathanBIN3+=	hosts.equiv
411.77Smycroft
421.90SkimNAMEDB=	localhost.rev root.cache
431.91Stron.ifdef USE_BIND4
441.91StronNAMEDB+=	named.boot
451.91Stron.else
461.90SkimNAMEDB+=	named.conf
471.90Skim.endif
481.1ScgdPCS=	pcs750.bin
491.1Scgd
501.88Slukemall clean cleandir depend distclean etc includes install lint:
511.1Scgd
521.34Scgd.ifndef DESTDIR
531.41Scgddistribution distrib-dirs snapshot:
541.36Scgd	@echo setenv DESTDIR before doing that!
551.34Scgd	@false
561.34Scgd.else
571.7Scgddistribution: distrib-dirs
581.87Sperry.if !defined(INSTALL_DONE)
591.53Scgd	(cd ..; ${MAKE} includes)
601.32Sjtc	(cd ..; ${MAKE} install)
611.87Sperry.endif
621.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
631.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc
641.77Smycroft	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 ${BIN3} ${DESTDIR}/etc
651.56Sthorpej	${INSTALL} -c -o root -g wheel -m 600 crontab \
661.56Sthorpej	    ${DESTDIR}/var/cron/tabs/root
671.56Sthorpej	${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
681.68Sperry	pwd_mkdb -p -d ${DESTDIR}/ ${DESTDIR}/etc/master.passwd
691.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
701.1Scgd	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
711.73Sperry	${INSTALL} -c -o root -g wheel -m 600 minfree \
721.73Sperry	    ${DESTDIR}/var/crash
731.1Scgd	(cd root; \
741.56Sthorpej		${INSTALL} -c -o root -g wheel -m 644 dot.cshrc \
751.1Scgd		    ${DESTDIR}/root/.cshrc; \
761.65Smikel		${INSTALL} -c -o root -g wheel -m 600 dot.klogin \
771.1Scgd		    ${DESTDIR}/root/.klogin; \
781.56Sthorpej		${INSTALL} -c -o root -g wheel -m 644 dot.login \
791.1Scgd		    ${DESTDIR}/root/.login; \
801.56Sthorpej		${INSTALL} -c -o root -g wheel -m 644 dot.profile \
811.1Scgd		    ${DESTDIR}/root/.profile; \
821.1Scgd		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
831.1Scgd		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
841.1Scgd		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
851.83Smrg	(cd mtree; ${MAKE} install)
861.63Smikel	(cd namedb; \
871.63Smikel		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
881.64Spk		    ${DESTDIR}/etc/namedb)
891.19Sderaadt	/bin/rm -f ${DESTDIR}/etc/localtime
901.19Sderaadt	ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
911.48Sderaadt	/bin/rm -f ${DESTDIR}/etc/rmt
921.48Sderaadt	ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
931.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
941.32Sjtc		${DESTDIR}/etc/dumpdates
951.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g operator -m 644 /dev/null \
961.44Sderaadt		${DESTDIR}/etc/skeykeys
971.56Sthorpej	${INSTALL} -c -o root -g wheel -m 600 /dev/null \
981.38Scgd		${DESTDIR}/var/cron/log
991.56Sthorpej	${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
1001.32Sjtc		${DESTDIR}/var/db/locate.database
1011.69Sperry	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1021.69Sperry		${DESTDIR}/var/log/authlog
1031.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
1041.32Sjtc		${DESTDIR}/var/log/lastlog
1051.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
1061.32Sjtc		${DESTDIR}/var/log/lpd-errs
1071.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1081.32Sjtc		${DESTDIR}/var/log/maillog
1091.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
1101.32Sjtc		${DESTDIR}/var/log/messages
1111.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1121.58Slukem		${DESTDIR}/var/log/secure
1131.58Slukem	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
1141.32Sjtc		${DESTDIR}/var/log/wtmp
1151.69Sperry	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1161.69Sperry		${DESTDIR}/var/log/xferlog
1171.56Sthorpej	${INSTALL} -c -o daemon -g staff -m 664 /dev/null \
1181.39Scgd		${DESTDIR}/var/msgs/bounds
1191.56Sthorpej	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
1201.32Sjtc		${DESTDIR}/var/run/utmp
1211.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1221.81Smrg		${DESTDIR}/var/games/atc_scores
1231.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1241.81Smrg		${DESTDIR}/var/games/battlestar.log
1251.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1261.81Smrg		${DESTDIR}/var/games/cfscores
1271.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1281.82Sperry		${DESTDIR}/var/games/criblog
1291.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1301.81Smrg		${DESTDIR}/var/games/robots_roll
1311.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1321.81Smrg		${DESTDIR}/var/games/rogue.scores
1331.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1341.81Smrg		${DESTDIR}/var/games/saillog
1351.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1361.81Smrg		${DESTDIR}/var/games/snakerawscores
1371.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1381.81Smrg		${DESTDIR}/var/games/snake.log
1391.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1401.81Smrg		${DESTDIR}/var/games/tetris.scores
1411.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1421.81Smrg		${DESTDIR}/var/games/larn/llog12.0
1431.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1441.81Smrg		${DESTDIR}/var/games/larn/lscore12.0
1451.81Smrg	${INSTALL} -c -o games -g games -m 664 /dev/null \
1461.81Smrg		${DESTDIR}/var/games/larn/playerids
1471.56Sthorpej	(cd etc.${MACHINE}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
1481.6Scgd	    fstab.* ${DESTDIR}/etc)
1491.49Stls	(cd ${DESTDIR}/dev; ./MAKEDEV all)
1501.62Sperry	(cd ../usr.bin/mail; ${MAKE} distribution)
1511.90Skim.ifndef NO_SENDMAIL
1521.35Scgd	(cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
1531.90Skim.endif
1541.1Scgd
1551.1Scgd
1561.7Scgddistrib-dirs:
1571.56Sthorpej	${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}
1581.67Sperry	-mtree -def mtree/NetBSD.dist -p ${DESTDIR}/ -u
1591.28Sjtc	cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys
1601.41Scgd
1611.41Scgdsnapshot: distribution snap_pre snap_tar snap_md
1621.41Scgd	cd ${DESTDIR}/snapshot && cksum * > CKSUMS
1631.41Scgd
1641.41Scgdsnap_pre:
1651.41Scgd	/bin/rm -rf ${DESTDIR}/snapshot
1661.56Sthorpej	${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/snapshot
1671.41Scgd
1681.41Scgdsnap_tar:
1691.41Scgd	cd ${DESTDIR} && tar cf - bin | gzip -9 > snapshot/bin.tar.gz
1701.41Scgd	cd ${DESTDIR} && tar cf - dev | gzip -9 > snapshot/dev.tar.gz
1711.41Scgd	cd ${DESTDIR} && tar cf - .profile .cshrc etc mnt root sys tmp | \
1721.41Scgd	    gzip -9 > snapshot/etc.tar.gz
1731.41Scgd	cd ${DESTDIR} && tar cf - sbin | gzip -9 > snapshot/sbin.tar.gz
1741.41Scgd	cd ${DESTDIR} && tar cf - usr/bin | gzip -9 > snapshot/usr.bin.tar.gz
1751.41Scgd	cd ${DESTDIR} && tar cf - usr/games | gzip -9 > \
1761.41Scgd	    snapshot/usr.games.tar.gz
1771.41Scgd	cd ${DESTDIR} && tar cf - usr/include | gzip -9 > \
1781.41Scgd	    snapshot/usr.include.tar.gz
1791.41Scgd	cd ${DESTDIR} && tar cf - usr/lib | gzip -9 > snapshot/usr.lib.tar.gz
1801.41Scgd	cd ${DESTDIR} && tar cf - usr/libexec | gzip -9 > \
1811.41Scgd	    snapshot/usr.libexec.tar.gz
1821.51Spk	cd ${DESTDIR} && tar cf - usr/mdec usr/libdata usr/local usr/src \
1831.51Spk	    usr/obj | gzip -9 > snapshot/usr.misc.tar.gz
1841.41Scgd	cd ${DESTDIR} && tar cf - usr/sbin | gzip -9 > snapshot/usr.sbin.tar.gz
1851.41Scgd	cd ${DESTDIR} && tar cf - usr/share | gzip -9 > \
1861.41Scgd	    snapshot/usr.share.tar.gz
1871.41Scgd	cd ${DESTDIR} && tar cf - var | gzip -9 > snapshot/var.tar.gz
1881.41Scgd
1891.41Scgdsnap_md:
1901.41Scgd# nothing here -- look in the machine-dependent Makefile.inc
1911.41Scgd
1921.34Scgd.endif	# DESTDIR check
1931.7Scgd
1941.1Scgd.include <bsd.prog.mk>
195