Makefile revision 1.184
11.183Slukem#	$NetBSD: Makefile,v 1.184 2001/10/13 14:22:11 lukem Exp $
21.66Smikel#	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
31.1Scgd
41.96Scjs# Environment variables without default values:
51.96Scjs#   DESTDIR must be set before anything in this file will work.
61.96Scjs#   RELEASEDIR is where the tarred up stuff for a snapshot or
71.96Scjs#	release will be placed.
81.96Scjs#
91.96Scjs# Environment variables with default values:
101.96Scjs#   LOCALTIME will set the default local time for the system you
111.96Scjs#	build; it determines what /etc/localtime is symlink'd to.
121.96Scjs#   KERNSRCDIR points to kernel source; it is set by default to ../sys,
131.96Scjs#	but can be overridden.
141.96Scjs#   KERNOBJDIR is the kernel build directory, it defaults to
151.172Sjlam#	${KERNSRCDIR}/arch/${MACHINE}/compile, but can be overridden.
161.96Scjs#   KERNCONFDIR is where the configuration files for kernels are found;
171.96Scjs#	default is ${KERNSRCDIR}/arch/${MACHINE}/conf but can be overridden.
181.97Scjs#   UPDATE is normally undefined; if defined, don't do a 'make clean'
191.97Scjs#	before kernel compile
201.96Scjs#   NO_SENDMAIL is normally undefined; if defined, it will not do a
211.96Scjs#	`make distribution' in the sendmail config file source directory.
221.96Scjs#   EXTRA_KERNELS has a machine-dependent list of kernels to build added
231.96Scjs#	to it, but you may also set this to have extra ones built.
241.119Sross#   BUILD_KERNELS are a machine-dependent list of kernels that should just
251.119Sross#	be built in place but not made into sets or installed, e.g., an
261.119Sross#	INSTALL kernel used later in src/distrib/.
271.154Sthorpej#
281.96Scjs# Targets:
291.96Scjs#    distribution: makes a full NetBSD distribution in DESTDIR. If
301.96Scjs#	INSTALL_DONE is set, it will not do a `make install.'
311.182Schs#	if DISTRIBUTION_DONE is set, it will not do anything.
321.96Scjs#    distrib-dirs: creates an empty NetBSD directory tree in DESTDIR.
331.96Scjs#	Called by distribution.
341.96Scjs#    snapshot: calls distribution, above, and then tars up the files
351.96Scjs#	into a release(7) format in RELEASEDIR. Any port-dependent
361.96Scjs#	stuff for this target is found in etc.${MACHINE}/Makefile.inc.
371.106Scjs#    release: a synonym for `snapshot'
381.96Scjs
391.149Ssjg# do this before bsd.own.mk so we get correct KERNSRCDIR
401.145Ssjg.include "../Makefile.inc"
411.145Ssjg
421.155Sthorpej# For NO_SENDMAIL, INSTPRIV, MKCRYPTO
431.90Skim.include <bsd.own.mk>
441.90Skim
451.23ScgdTZDIR=		/usr/share/zoneinfo
461.157SkleinkLOCALTIME?=	UTC
471.19Sderaadt
481.161Shubertf# Flags for creating ISO CDROM image
491.161Shubertf# mkisofs is expected to be in $PATH, install via pkgsrc/sysutils/cdrecord
501.161ShubertfMKISOFS?=	mkisofs
511.161ShubertfMKISOFS_FLAGS+= -J -l \
521.161Shubertf		-r -T -v \
531.161Shubertf		-P "The NetBSD Project" \
541.164Shubertf		-m "${RELEASEDIR}/installation/cdrom"
551.161Shubertf
561.55Sperry# setting NOOBJ prevents "make obj" from doing anything;
571.55Sperry# an objdir would break the installation stuff below
581.101SlukemMKOBJ=	no
591.1Scgd
601.80Sjonathan# MD Makefile.inc may append MD targets to BIN[123].  Make sure all
611.80Sjonathan# are empty, to preserve the old semantics of setting them below with "=".
621.80SjonathanBIN1=	
631.80SjonathanBIN2=
641.80SjonathanBIN3=
651.80Sjonathan
661.117Ssimonb# Directories to build in ${RELEASEDIR}.   MD Makefile.inc files can
671.117Ssimonb# add to this.
681.117Ssimonb# NOTE: Parent directories must be listed before subdirectories.
691.117SsimonbINSTALLATION_DIRS= \
701.158Sfvdl	binary binary/sets binary/kernel installation
711.117Ssimonb
721.71Scjs.if exists(etc.${MACHINE}/Makefile.inc)
731.71Scjs.include "etc.${MACHINE}/Makefile.inc"
741.71Scjs.endif
751.32Sjtc
761.96Scjs# Use multiple jobs for kernel builds, if NBUILDJOBS set.
771.96Scjs# (Taken from src/Makefile.)
781.96Scjs.if defined(NBUILDJOBS)
791.96Scjs_J= -j${NBUILDJOBS}
801.96Scjs.endif
811.96Scjs
821.21Scgd# -rw-r--r--
831.21ScgdBINOWN= root
841.21ScgdBINGRP= wheel
851.184SlukemBIN1+=	bootptab changelist csh.cshrc csh.login csh.logout daily \
861.131Sveego	daily.conf dm.conf floppytab ftpchroot ftpusers ftpwelcome \
871.131Sveego	gettytab group hosts hosts.lpd inetd.conf lkm.conf \
881.131Sveego	mailer.conf man.conf monthly monthly.conf mrouted.conf \
891.151Sfvdl	netconfig networks newsyslog.conf nsswitch.conf ntp.conf \
901.131Sveego	phones printcap profile protocols rbootd.conf rc rc.conf \
911.159Slukem	rc.lkm rc.local rc.subr rc.shutdown remote rpc \
921.142Stsarna	security security.conf services shells sysctl.conf syslog.conf \
931.142Stsarna	weekly weekly.conf wscons.conf \
941.109Sdrochner	etc.${MACHINE}/ttys etc.${MACHINE}/disktab
951.105Smycroft
961.121Sfvdl.if	(${MACHINE_ARCH} == "m68k") || \
971.105Smycroft	(${MACHINE_ARCH} == "ns32k") || \
981.105Smycroft	(${MACHINE_ARCH} == "vax") || \
991.105Smycroft	(${MACHINE_ARCH} == "arm32")
1001.129SchristosBIN1+=	ld.so.conf
1011.129Schristos.elif exists(etc.${MACHINE_ARCH}/ld.so.conf)
1021.132SjlamBIN1+=	etc.${MACHINE_ARCH}/ld.so.conf
1031.152Sperry.endif
1041.152Sperry
1051.152Sperry.if exists(etc.${MACHINE_ARCH}/ttyaction)
1061.152SperryBIN1+=	etc.${MACHINE_ARCH}/ttyaction
1071.105Smycroft.endif
1081.1Scgd
1091.46Sderaadt# -rw-rw-r--
1101.80SjonathanBIN2+=	motd
1111.1Scgd
1121.77Smycroft# -rw-------
1131.80SjonathanBIN3+=	hosts.equiv
1141.77Smycroft
1151.144SthorpejNAMEDB=	127 root.cache named.conf localhost loopback.v6
1161.1ScgdPCS=	pcs750.bin
1171.1Scgd
1181.170Sjdolecek# find out endianness of target and set proper flag for pwd_mkdb so that
1191.170Sjdolecek# it creates database in same endianness
1201.170Sjdolecek.if exists(${DESTDIR}/usr/include/machine/endian_machdep.h)
1211.171SsimonbTARGET_ENDIANNESS!= \
1221.171Ssimonb	( echo "\#include <machine/endian_machdep.h>" ; echo _BYTE_ORDER ) | \
1231.171Ssimonb	${CC} -I${DESTDIR}/usr/include -E - | tail -1 | awk '{print $$1}'
1241.170Sjdolecek.else
1251.170SjdolecekTARGET_ENDIANNESS=
1261.170Sjdolecek.endif
1271.170Sjdolecek
1281.170Sjdolecek.if ${TARGET_ENDIANNESS} == "_LITTLE_ENDIAN"
1291.170SjdolecekTARGET_ENDIANNESS= -L
1301.170Sjdolecek.elif ${TARGET_ENDIANNESS} == "_BIG_ENDIAN"
1311.170SjdolecekTARGET_ENDIANNESS= -B
1321.170Sjdolecek.else
1331.177Stsutsui# XXX sh3 should be split into sh3eb and sh3el
1341.170SjdolecekTARGET_ENDIANNESS=
1351.170Sjdolecek.endif
1361.170Sjdolecek
1371.88Slukemall clean cleandir depend distclean etc includes install lint:
1381.1Scgd
1391.170Sjdolecek
1401.149Ssjg.include <bsd.kernobj.mk>
1411.149Ssjg
1421.149Ssjgobj:
1431.149Ssjg	mkdir -p ${KERNOBJDIR}
1441.149Ssjg
1451.34Scgd.ifndef DESTDIR
1461.174Schristos__warndestdir: .USE
1471.36Scgd	@echo setenv DESTDIR before doing that!
1481.34Scgd	@false
1491.174Schristosdistribution distrib-dirs release snapshot snap_pre snap_md_pre \
1501.174Schristosiso-image: __warndestdir
1511.174Schristos.if !target(snap_md_post)
1521.174Schristossnap_md_post: __warndestdir
1531.174Schristos.endif
1541.34Scgd.else
1551.7Scgddistribution: distrib-dirs
1561.182Schs.if !defined(DISTRIBUTION_DONE)
1571.87Sperry.if !defined(INSTALL_DONE)
1581.107Sscottr	(cd ..; ${MAKE} _DISTRIB= includes)
1591.107Sscottr	(cd ..; ${MAKE} _DISTRIB= install)
1601.87Sperry.endif
1611.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} \
1621.124Ssimonb	    ${DESTDIR}/etc
1631.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} \
1641.124Ssimonb	    ${DESTDIR}/etc
1651.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 ${BIN3} \
1661.124Ssimonb	    ${DESTDIR}/etc
1671.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 aliases \
1681.147Sitojun	    ${DESTDIR}/etc/mail
1691.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 crontab \
1701.56Sthorpej	    ${DESTDIR}/var/cron/tabs/root
1711.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 master.passwd \
1721.124Ssimonb	    ${DESTDIR}/etc
1731.171Ssimonb	pwd_mkdb -p ${TARGET_ENDIANNESS} -d ${DESTDIR}/ \
1741.171Ssimonb		${DESTDIR}/etc/master.passwd
1751.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
1761.1Scgd	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
1771.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 minfree \
1781.73Sperry	    ${DESTDIR}/var/crash
1791.1Scgd	(cd root; \
1801.124Ssimonb		${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.cshrc \
1811.1Scgd		    ${DESTDIR}/root/.cshrc; \
1821.124Ssimonb		${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 dot.klogin \
1831.1Scgd		    ${DESTDIR}/root/.klogin; \
1841.124Ssimonb		${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.login \
1851.1Scgd		    ${DESTDIR}/root/.login; \
1861.124Ssimonb		${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.profile \
1871.1Scgd		    ${DESTDIR}/root/.profile; \
1881.128Smycroft		${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.shrc \
1891.128Smycroft		    ${DESTDIR}/root/.shrc; \
1901.1Scgd		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
1911.1Scgd		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
1921.1Scgd		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
1931.162Slukem	(cd defaults; ${MAKE} install)
1941.83Smrg	(cd mtree; ${MAKE} install)
1951.63Smikel	(cd namedb; \
1961.124Ssimonb		${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
1971.124Ssimonb		    ${NAMEDB} ${DESTDIR}/etc/namedb)
1981.140Slukem	(cd rc.d; ${MAKE} install)
1991.19Sderaadt	/bin/rm -f ${DESTDIR}/etc/localtime
2001.19Sderaadt	ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
2011.48Sderaadt	/bin/rm -f ${DESTDIR}/etc/rmt
2021.48Sderaadt	ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
2031.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g operator -m 664 /dev/null \
2041.32Sjtc		${DESTDIR}/etc/dumpdates
2051.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g operator -m 600 /dev/null \
2061.44Sderaadt		${DESTDIR}/etc/skeykeys
2071.127Sperry	${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 /dev/null \
2081.127Sperry		${DESTDIR}/var/at/at.deny
2091.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 /dev/null \
2101.38Scgd		${DESTDIR}/var/cron/log
2111.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
2121.32Sjtc		${DESTDIR}/var/db/locate.database
2131.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o uucp -g dialer -m 640 /dev/null \
2141.113Sfair		${DESTDIR}/var/log/aculog
2151.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
2161.69Sperry		${DESTDIR}/var/log/authlog
2171.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
2181.32Sjtc		${DESTDIR}/var/log/lastlog
2191.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
2201.32Sjtc		${DESTDIR}/var/log/lpd-errs
2211.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
2221.32Sjtc		${DESTDIR}/var/log/maillog
2231.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
2241.32Sjtc		${DESTDIR}/var/log/messages
2251.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
2261.58Slukem		${DESTDIR}/var/log/secure
2271.137Smycroft	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
2281.137Smycroft		${DESTDIR}/var/log/sendmail.st
2291.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
2301.32Sjtc		${DESTDIR}/var/log/wtmp
2311.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
2321.69Sperry		${DESTDIR}/var/log/xferlog
2331.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o daemon -g staff -m 664 /dev/null \
2341.39Scgd		${DESTDIR}/var/msgs/bounds
2351.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
2361.32Sjtc		${DESTDIR}/var/run/utmp
2371.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2381.81Smrg		${DESTDIR}/var/games/atc_scores
2391.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2401.81Smrg		${DESTDIR}/var/games/battlestar.log
2411.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2421.81Smrg		${DESTDIR}/var/games/cfscores
2431.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2441.82Sperry		${DESTDIR}/var/games/criblog
2451.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2461.81Smrg		${DESTDIR}/var/games/robots_roll
2471.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2481.81Smrg		${DESTDIR}/var/games/rogue.scores
2491.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2501.81Smrg		${DESTDIR}/var/games/saillog
2511.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2521.81Smrg		${DESTDIR}/var/games/snakerawscores
2531.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2541.81Smrg		${DESTDIR}/var/games/snake.log
2551.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2561.81Smrg		${DESTDIR}/var/games/tetris.scores
2571.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2581.81Smrg		${DESTDIR}/var/games/larn/llog12.0
2591.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2601.81Smrg		${DESTDIR}/var/games/larn/lscore12.0
2611.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2621.81Smrg		${DESTDIR}/var/games/larn/playerids
2631.124Ssimonb	(cd etc.${MACHINE}; ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} \
2641.124Ssimonb	    -g ${BINGRP} -m 444 fstab.* ${DESTDIR}/etc)
2651.49Stls	(cd ${DESTDIR}/dev; ./MAKEDEV all)
2661.165Ssimonb	(cd skel; ${MAKE} distribution)
2671.62Sperry	(cd ../usr.bin/mail; ${MAKE} distribution)
2681.143Sperry	(cd ../gnu/usr.sbin/postfix/; ${MAKE} distribution)
2691.155Sthorpej.if (${MKCRYPTO} != "no")
2701.155Sthorpej	(cd ../usr.bin/ssh; ${MAKE} distribution)
2711.155Sthorpej.endif
2721.90Skim.ifndef NO_SENDMAIL
2731.133Stron	(cd ../gnu/usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
2741.182Schs.endif
2751.90Skim.endif
2761.1Scgd
2771.7Scgddistrib-dirs:
2781.124Ssimonb	${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${DESTDIR}
2791.181Senami	${MTREE} -def mtree/NetBSD.dist -p ${DESTDIR}/ -U
2801.180Stv	cd ${DESTDIR}/; rm -f sys; ln -s usr/src/sys sys
2811.99Scjs
2821.96Scjs.if !defined(RELEASEDIR)
2831.175Schristos__warnreleasedir: .USE
2841.96Scjs	@echo setenv RELEASEDIR before doing that!
2851.96Scjs	@false
2861.175Schristosrelease snapshot snap_pre snap_md_pre iso-image: __warnreleasedir
2871.175Schristos.if !target(snap_md_post)
2881.175Schristossnap_md_post: __warnreleasedir
2891.175Schristos.endif
2901.96Scjs.else
2911.117Ssimonbrelease snapshot: distribution snap_pre snap_md_pre snap_kern snap_md_post
2921.141Sthorpej	(cd ../distrib/sets; ${MAKE} sets)
2931.123Sis	sh ../distrib/sets/makesums -t ${RELEASEDIR}/binary/kernel '*.gz'
2941.161Shubertf
2951.161Shubertf# Standalone target to create a CDROM image after the release
2961.161Shubertf# was composed. Should be run after "make build" in both src and xsrc
2971.161Shubertfiso-image: iso-image_md_post
2981.161Shubertf
2991.161Shubertfiso-image_mi: iso-image_md_pre
3001.161Shubertf	@if ${MKISOFS} --version; then \
3011.161Shubertf		mkdir -p ${RELEASEDIR}/installation/cdrom ; \
3021.161Shubertf		${MKISOFS} ${MKISOFS_FLAGS} \
3031.161Shubertf			-o ${RELEASEDIR}/installation/cdrom/netbsd-${MACHINE}.iso \
3041.161Shubertf			${RELEASEDIR} ; \
3051.161Shubertf		sh ../distrib/sets/makesums -t ${RELEASEDIR}/installation/cdrom '*.iso' ; \
3061.161Shubertf	else \
3071.161Shubertf		echo "install pkgsrc/sysutils/cdrecord and type 'make iso-image'." ; \
3081.161Shubertf	fi
3091.161Shubertf
3101.161Shubertf# Setup the $RELEASEDIR to produce a bootable CD image:
3111.161Shubertfiso-image_md_pre:
3121.161Shubertf# nothing here -- look in the machine-dependent Makefile.inc
3131.161Shubertf
3141.161Shubertf# Fixup the  CD-image to be bootable
3151.161Shubertfiso-image_md_post: iso-image_mi
3161.161Shubertf# nothing here -- look in the machine-dependent Makefile.inc
3171.41Scgd
3181.41Scgdsnap_pre:
3191.168Sjmc# Could be a mount point, ignore the errors
3201.167Sjmc	-/bin/rm -rf ${RELEASEDIR}
3211.124Ssimonb	${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR}
3221.117Ssimonb.for dir in ${INSTALLATION_DIRS}
3231.124Ssimonb	${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR}/${dir}
3241.117Ssimonb.endfor
3251.96Scjs
3261.96Scjs
3271.96Scjs# This target builds the GENERIC kernel (which must exist for all
3281.96Scjs# ports) and puts it in binary/sets/kern.tgz, and also builds any
3291.114Sfair# kernels specified in EXTRA_KERNELS. Since NetBSD's kernel build
3301.114Sfair# system can create more than one kernel from a single configuration
3311.114Sfair# we figure out how many there are, what they're named, and move them
3321.114Sfair# to binary/kernel/${KERNEL}.${CONFIGFILE}.gz - most often KERNEL will
3331.116Sfair# simply be "netbsd". If we don't find the "config" line, assume the
3341.116Sfair# kernel will be "netbsd" (some config files are simple additions on
3351.116Sfair# GENERIC, and just include it).
3361.116Sfair#
3371.116SfairGETKERNELAWK=	awk '/^config/ {print $$2; found=1} \
3381.116Sfair		END{ if (found == 0) print "netbsd"; }'
3391.96Scjs#
3401.118Sgwr.if !target(snap_kern)
3411.96Scjssnap_kern:
3421.145Ssjg.ifndef KERNELS_DONE
3431.135Smycroft.for configfile in GENERIC ${EXTRA_KERNELS} ${BUILD_KERNELS}
3441.125Ssommerfe	cd ${KERNCONFDIR} && ${CONFIG} \
3451.179Smrg		-b ${KERNOBJDIR}/${configfile:C/.*\///} -s ${KERNSRCDIR} ${configfile}
3461.97Scjs.ifndef UPDATE
3471.179Smrg	cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} distclean 
3481.96Scjs.endif
3491.179Smrg	cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} depend && ${MAKE} ${_J}
3501.135Smycroft.endfor # kernels
3511.96Scjs	cd ${KERNOBJDIR}/GENERIC &&	\
3521.116Sfair		tar cf - `${GETKERNELAWK} ${KERNCONFDIR}/GENERIC` |\
3531.96Scjs		gzip -c -9 > ${RELEASEDIR}/binary/sets/kern.tgz
3541.135Smycroft.for configfile in GENERIC ${EXTRA_KERNELS}
3551.179Smrg	cd ${KERNOBJDIR}/${configfile:C/.*\///} &&	\
3561.116Sfair		for kernel in `${GETKERNELAWK} \
3571.179Smrg			${KERNCONFDIR}/${configfile:C/.*\///}` ; do   \
3581.114Sfair		gzip -c -9 < $${kernel} > \
3591.179Smrg			${RELEASEDIR}/binary/kernel/$${kernel}.${configfile:C/.*\///}.gz ; done
3601.96Scjs.endfor # EXTRA_KERNELS
3611.145Ssjg.endif # KERNELS_DONE
3621.118Sgwr.endif # no target(snap_kern)
3631.108Sdrochner
3641.96Scjs.endif # RELEASEDIR check
3651.41Scgd
3661.117Ssimonbsnap_md_pre:
3671.117Ssimonb# nothing here -- look in the machine-dependent Makefile.inc
3681.117Ssimonb
3691.117Ssimonbsnap_md_post:
3701.41Scgd# nothing here -- look in the machine-dependent Makefile.inc
3711.41Scgd
3721.34Scgd.endif	# DESTDIR check
3731.7Scgd
3741.1Scgd.include <bsd.prog.mk>
375