Makefile revision 1.171
11.171Ssimonb#	$NetBSD: Makefile,v 1.171 2000/11/30 11:31:05 simonb 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.96Scjs#	${KERNSRCDIR}/arch/${MACHINE}/compile/KERNELNAME, but can be
161.96Scjs#	overridden.
171.96Scjs#   KERNCONFDIR is where the configuration files for kernels are found;
181.96Scjs#	default is ${KERNSRCDIR}/arch/${MACHINE}/conf but can be overridden.
191.97Scjs#   UPDATE is normally undefined; if defined, don't do a 'make clean'
201.97Scjs#	before kernel compile
211.96Scjs#   NO_SENDMAIL is normally undefined; if defined, it will not do a
221.96Scjs#	`make distribution' in the sendmail config file source directory.
231.96Scjs#   EXTRA_KERNELS has a machine-dependent list of kernels to build added
241.96Scjs#	to it, but you may also set this to have extra ones built.
251.119Sross#   BUILD_KERNELS are a machine-dependent list of kernels that should just
261.119Sross#	be built in place but not made into sets or installed, e.g., an
271.119Sross#	INSTALL kernel used later in src/distrib/.
281.154Sthorpej#
291.96Scjs# Targets:
301.96Scjs#    distribution: makes a full NetBSD distribution in DESTDIR. If
311.96Scjs#	INSTALL_DONE is set, it will not do a `make install.'
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.131SveegoBIN1+=	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.120Sitojun
1091.120Sitojun# IPv6
1101.120SitojunBIN1+=	rtadvd.conf
1111.1Scgd
1121.46Sderaadt# -rw-rw-r--
1131.80SjonathanBIN2+=	motd
1141.1Scgd
1151.77Smycroft# -rw-------
1161.80SjonathanBIN3+=	hosts.equiv
1171.77Smycroft
1181.144SthorpejNAMEDB=	127 root.cache named.conf localhost loopback.v6
1191.1ScgdPCS=	pcs750.bin
1201.1Scgd
1211.170Sjdolecek# find out endianness of target and set proper flag for pwd_mkdb so that
1221.170Sjdolecek# it creates database in same endianness
1231.170Sjdolecek.if exists(${DESTDIR}/usr/include/machine/endian_machdep.h)
1241.171SsimonbTARGET_ENDIANNESS!= \
1251.171Ssimonb	( echo "\#include <machine/endian_machdep.h>" ; echo _BYTE_ORDER ) | \
1261.171Ssimonb	${CC} -I${DESTDIR}/usr/include -E - | tail -1 | awk '{print $$1}'
1271.170Sjdolecek.else
1281.170SjdolecekTARGET_ENDIANNESS=
1291.170Sjdolecek.endif
1301.170Sjdolecek
1311.170Sjdolecek.if ${TARGET_ENDIANNESS} == "_LITTLE_ENDIAN"
1321.170SjdolecekTARGET_ENDIANNESS= -L
1331.170Sjdolecek.elif ${TARGET_ENDIANNESS} == "_BIG_ENDIAN"
1341.170SjdolecekTARGET_ENDIANNESS= -B
1351.170Sjdolecek.else
1361.170SjdolecekTARGET_ENDIANNESS=
1371.170Sjdolecek.endif
1381.170Sjdolecek
1391.88Slukemall clean cleandir depend distclean etc includes install lint:
1401.1Scgd
1411.170Sjdolecek
1421.149Ssjg.include <bsd.kernobj.mk>
1431.149Ssjg
1441.149Ssjgobj:
1451.149Ssjg	mkdir -p ${KERNOBJDIR}
1461.149Ssjg
1471.34Scgd.ifndef DESTDIR
1481.161Shubertfdistribution distrib-dirs release snapshot snap_pre snap_md_pre \
1491.161Shubertfsnap_md_post iso-image:
1501.36Scgd	@echo setenv DESTDIR before doing that!
1511.34Scgd	@false
1521.34Scgd.else
1531.7Scgddistribution: distrib-dirs
1541.87Sperry.if !defined(INSTALL_DONE)
1551.107Sscottr	(cd ..; ${MAKE} _DISTRIB= includes)
1561.107Sscottr	(cd ..; ${MAKE} _DISTRIB= install)
1571.87Sperry.endif
1581.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} \
1591.124Ssimonb	    ${DESTDIR}/etc
1601.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} \
1611.124Ssimonb	    ${DESTDIR}/etc
1621.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 ${BIN3} \
1631.124Ssimonb	    ${DESTDIR}/etc
1641.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 aliases \
1651.147Sitojun	    ${DESTDIR}/etc/mail
1661.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 crontab \
1671.56Sthorpej	    ${DESTDIR}/var/cron/tabs/root
1681.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 master.passwd \
1691.124Ssimonb	    ${DESTDIR}/etc
1701.171Ssimonb	pwd_mkdb -p ${TARGET_ENDIANNESS} -d ${DESTDIR}/ \
1711.171Ssimonb		${DESTDIR}/etc/master.passwd
1721.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
1731.1Scgd	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
1741.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 minfree \
1751.73Sperry	    ${DESTDIR}/var/crash
1761.1Scgd	(cd root; \
1771.124Ssimonb		${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.cshrc \
1781.1Scgd		    ${DESTDIR}/root/.cshrc; \
1791.124Ssimonb		${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 dot.klogin \
1801.1Scgd		    ${DESTDIR}/root/.klogin; \
1811.124Ssimonb		${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.login \
1821.1Scgd		    ${DESTDIR}/root/.login; \
1831.124Ssimonb		${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.profile \
1841.1Scgd		    ${DESTDIR}/root/.profile; \
1851.128Smycroft		${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.shrc \
1861.128Smycroft		    ${DESTDIR}/root/.shrc; \
1871.1Scgd		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
1881.1Scgd		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
1891.1Scgd		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
1901.162Slukem	(cd defaults; ${MAKE} install)
1911.83Smrg	(cd mtree; ${MAKE} install)
1921.63Smikel	(cd namedb; \
1931.124Ssimonb		${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
1941.124Ssimonb		    ${NAMEDB} ${DESTDIR}/etc/namedb)
1951.140Slukem	(cd rc.d; ${MAKE} install)
1961.19Sderaadt	/bin/rm -f ${DESTDIR}/etc/localtime
1971.19Sderaadt	ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
1981.48Sderaadt	/bin/rm -f ${DESTDIR}/etc/rmt
1991.48Sderaadt	ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
2001.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g operator -m 664 /dev/null \
2011.32Sjtc		${DESTDIR}/etc/dumpdates
2021.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g operator -m 600 /dev/null \
2031.44Sderaadt		${DESTDIR}/etc/skeykeys
2041.127Sperry	${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 /dev/null \
2051.127Sperry		${DESTDIR}/var/at/at.deny
2061.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 /dev/null \
2071.38Scgd		${DESTDIR}/var/cron/log
2081.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
2091.32Sjtc		${DESTDIR}/var/db/locate.database
2101.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o uucp -g dialer -m 640 /dev/null \
2111.113Sfair		${DESTDIR}/var/log/aculog
2121.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
2131.69Sperry		${DESTDIR}/var/log/authlog
2141.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
2151.32Sjtc		${DESTDIR}/var/log/lastlog
2161.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
2171.32Sjtc		${DESTDIR}/var/log/lpd-errs
2181.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
2191.32Sjtc		${DESTDIR}/var/log/maillog
2201.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
2211.32Sjtc		${DESTDIR}/var/log/messages
2221.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
2231.58Slukem		${DESTDIR}/var/log/secure
2241.137Smycroft	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
2251.137Smycroft		${DESTDIR}/var/log/sendmail.st
2261.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
2271.32Sjtc		${DESTDIR}/var/log/wtmp
2281.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
2291.69Sperry		${DESTDIR}/var/log/xferlog
2301.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o daemon -g staff -m 664 /dev/null \
2311.39Scgd		${DESTDIR}/var/msgs/bounds
2321.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
2331.32Sjtc		${DESTDIR}/var/run/utmp
2341.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2351.81Smrg		${DESTDIR}/var/games/atc_scores
2361.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2371.81Smrg		${DESTDIR}/var/games/battlestar.log
2381.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2391.81Smrg		${DESTDIR}/var/games/cfscores
2401.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2411.82Sperry		${DESTDIR}/var/games/criblog
2421.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2431.81Smrg		${DESTDIR}/var/games/robots_roll
2441.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2451.81Smrg		${DESTDIR}/var/games/rogue.scores
2461.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2471.81Smrg		${DESTDIR}/var/games/saillog
2481.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2491.81Smrg		${DESTDIR}/var/games/snakerawscores
2501.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2511.81Smrg		${DESTDIR}/var/games/snake.log
2521.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2531.81Smrg		${DESTDIR}/var/games/tetris.scores
2541.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2551.81Smrg		${DESTDIR}/var/games/larn/llog12.0
2561.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2571.81Smrg		${DESTDIR}/var/games/larn/lscore12.0
2581.124Ssimonb	${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
2591.81Smrg		${DESTDIR}/var/games/larn/playerids
2601.124Ssimonb	(cd etc.${MACHINE}; ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} \
2611.124Ssimonb	    -g ${BINGRP} -m 444 fstab.* ${DESTDIR}/etc)
2621.49Stls	(cd ${DESTDIR}/dev; ./MAKEDEV all)
2631.165Ssimonb	(cd skel; ${MAKE} distribution)
2641.62Sperry	(cd ../usr.bin/mail; ${MAKE} distribution)
2651.163Sthorpej	(cd ../usr.bin/ssh; ${MAKE} distribution)
2661.143Sperry	(cd ../gnu/usr.sbin/postfix/; ${MAKE} distribution)
2671.155Sthorpej.if (${MKCRYPTO} != "no")
2681.155Sthorpej	(cd ../usr.bin/ssh; ${MAKE} distribution)
2691.155Sthorpej.endif
2701.90Skim.ifndef NO_SENDMAIL
2711.133Stron	(cd ../gnu/usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
2721.90Skim.endif
2731.1Scgd
2741.7Scgddistrib-dirs:
2751.124Ssimonb	${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${DESTDIR}
2761.67Sperry	-mtree -def mtree/NetBSD.dist -p ${DESTDIR}/ -u
2771.28Sjtc	cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys
2781.99Scjs
2791.96Scjs.if !defined(RELEASEDIR)
2801.161Shubertfrelease snapshot snap_pre snap_md_pre snap_md_post iso-image:
2811.96Scjs	@echo setenv RELEASEDIR before doing that!
2821.96Scjs	@false
2831.96Scjs.else
2841.117Ssimonbrelease snapshot: distribution snap_pre snap_md_pre snap_kern snap_md_post
2851.141Sthorpej	(cd ../distrib/sets; ${MAKE} sets)
2861.123Sis	sh ../distrib/sets/makesums -t ${RELEASEDIR}/binary/kernel '*.gz'
2871.161Shubertf
2881.161Shubertf# Standalone target to create a CDROM image after the release
2891.161Shubertf# was composed. Should be run after "make build" in both src and xsrc
2901.161Shubertfiso-image: iso-image_md_post
2911.161Shubertf
2921.161Shubertfiso-image_mi: iso-image_md_pre
2931.161Shubertf	@if ${MKISOFS} --version; then \
2941.161Shubertf		mkdir -p ${RELEASEDIR}/installation/cdrom ; \
2951.161Shubertf		${MKISOFS} ${MKISOFS_FLAGS} \
2961.161Shubertf			-o ${RELEASEDIR}/installation/cdrom/netbsd-${MACHINE}.iso \
2971.161Shubertf			${RELEASEDIR} ; \
2981.161Shubertf		sh ../distrib/sets/makesums -t ${RELEASEDIR}/installation/cdrom '*.iso' ; \
2991.161Shubertf	else \
3001.161Shubertf		echo "install pkgsrc/sysutils/cdrecord and type 'make iso-image'." ; \
3011.161Shubertf	fi
3021.161Shubertf
3031.161Shubertf# Setup the $RELEASEDIR to produce a bootable CD image:
3041.161Shubertfiso-image_md_pre:
3051.161Shubertf# nothing here -- look in the machine-dependent Makefile.inc
3061.161Shubertf
3071.161Shubertf# Fixup the  CD-image to be bootable
3081.161Shubertfiso-image_md_post: iso-image_mi
3091.161Shubertf# nothing here -- look in the machine-dependent Makefile.inc
3101.41Scgd
3111.41Scgdsnap_pre:
3121.168Sjmc# Could be a mount point, ignore the errors
3131.167Sjmc	-/bin/rm -rf ${RELEASEDIR}
3141.124Ssimonb	${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR}
3151.117Ssimonb.for dir in ${INSTALLATION_DIRS}
3161.124Ssimonb	${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR}/${dir}
3171.117Ssimonb.endfor
3181.96Scjs
3191.96Scjs
3201.96Scjs# This target builds the GENERIC kernel (which must exist for all
3211.96Scjs# ports) and puts it in binary/sets/kern.tgz, and also builds any
3221.114Sfair# kernels specified in EXTRA_KERNELS. Since NetBSD's kernel build
3231.114Sfair# system can create more than one kernel from a single configuration
3241.114Sfair# we figure out how many there are, what they're named, and move them
3251.114Sfair# to binary/kernel/${KERNEL}.${CONFIGFILE}.gz - most often KERNEL will
3261.116Sfair# simply be "netbsd". If we don't find the "config" line, assume the
3271.116Sfair# kernel will be "netbsd" (some config files are simple additions on
3281.116Sfair# GENERIC, and just include it).
3291.116Sfair#
3301.116SfairGETKERNELAWK=	awk '/^config/ {print $$2; found=1} \
3311.116Sfair		END{ if (found == 0) print "netbsd"; }'
3321.96Scjs#
3331.118Sgwr.if !target(snap_kern)
3341.96Scjssnap_kern:
3351.145Ssjg.ifndef KERNELS_DONE
3361.135Smycroft.for configfile in GENERIC ${EXTRA_KERNELS} ${BUILD_KERNELS}
3371.125Ssommerfe	cd ${KERNCONFDIR} && ${CONFIG} \
3381.135Smycroft		-b ${KERNOBJDIR}/${configfile} -s ${KERNSRCDIR} ${configfile}
3391.97Scjs.ifndef UPDATE
3401.166Sgarbled	cd ${KERNOBJDIR}/${configfile} && ${MAKE} distclean 
3411.96Scjs.endif
3421.135Smycroft	cd ${KERNOBJDIR}/${configfile} && ${MAKE} depend && ${MAKE} ${_J}
3431.135Smycroft.endfor # kernels
3441.96Scjs	cd ${KERNOBJDIR}/GENERIC &&	\
3451.116Sfair		tar cf - `${GETKERNELAWK} ${KERNCONFDIR}/GENERIC` |\
3461.96Scjs		gzip -c -9 > ${RELEASEDIR}/binary/sets/kern.tgz
3471.135Smycroft.for configfile in GENERIC ${EXTRA_KERNELS}
3481.114Sfair	cd ${KERNOBJDIR}/${configfile} &&	\
3491.116Sfair		for kernel in `${GETKERNELAWK} \
3501.114Sfair			${KERNCONFDIR}/${configfile}` ; {   \
3511.114Sfair		gzip -c -9 < $${kernel} > \
3521.114Sfair			${RELEASEDIR}/binary/kernel/$${kernel}.${configfile}.gz ; }
3531.96Scjs.endfor # EXTRA_KERNELS
3541.145Ssjg.endif # KERNELS_DONE
3551.118Sgwr.endif # no target(snap_kern)
3561.108Sdrochner
3571.96Scjs.endif # RELEASEDIR check
3581.41Scgd
3591.117Ssimonbsnap_md_pre:
3601.117Ssimonb# nothing here -- look in the machine-dependent Makefile.inc
3611.117Ssimonb
3621.117Ssimonbsnap_md_post:
3631.41Scgd# nothing here -- look in the machine-dependent Makefile.inc
3641.41Scgd
3651.34Scgd.endif	# DESTDIR check
3661.7Scgd
3671.1Scgd.include <bsd.prog.mk>
368