Change the way kernel sets are specified, and make them

more consistent.  To quote the comment in etc/Makefile
that describes how it's done:

# This target builds the kernels specified by each port.  A port may
# specify the following kernels:
#
#       KERNEL_SETS             The list of kernels that will be
#                               packaged into sets, named
#                               kern-${kernel}.tgz.  These kernels
#                               are also placed in the binary/kernels
#                               area of the release package as
#                               netbsd-${kernel}.gz.
#
#       EXTRA_KERNELS           Additional kernels to place in the
#                               binary/kernels area of the release
#                               package as netbsd-${kernel}.gz, but
#                               which are not placed into sets. This
#                               allows a port to provide e.g. a netbootable
#                               installation kernel containing a ramdisk.
#
#       BUILD_KERNELS           Additional kernels to build which are
#                               not placed into sets nor into the
#                               binary/kernels area of the release
#                               package.  These are typically kernels
#                               that are built for inclusion only in
#                               installation disk/CD-ROM/tape images.
#
This commit is contained in:
thorpej 2001-11-29 22:45:53 +00:00
parent 9caaf10ee6
commit 44f4566e1a
28 changed files with 132 additions and 151 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.195 2001/11/25 18:19:14 thorpej Exp $
# $NetBSD: Makefile,v 1.196 2001/11/29 22:45:53 thorpej Exp $
# from: @(#)Makefile 8.7 (Berkeley) 5/25/95
# Environment variables without default values:
@ -19,11 +19,6 @@
# before kernel compile
# NO_SENDMAIL is normally undefined; if defined, it will not do a
# `make distribution' in the sendmail config file source directory.
# EXTRA_KERNELS has a machine-dependent list of kernels to build added
# to it, but you may also set this to have extra ones built.
# BUILD_KERNELS are a machine-dependent list of kernels that should just
# be built in place but not made into sets or installed, e.g., an
# INSTALL kernel used later in src/distrib/.
#
# Targets:
# distribution: makes a full NetBSD distribution in DESTDIR. If
@ -337,16 +332,29 @@ snap_pre:
${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR}/${dir}
.endfor
# This target builds the GENERIC kernel (which must exist for all
# ports) and puts it in binary/sets/kern.tgz, and also builds any
# kernels specified in EXTRA_KERNELS. Since NetBSD's kernel build
# system can create more than one kernel from a single configuration
# we figure out how many there are, what they're named, and move them
# to binary/kernel/${KERNEL}.${CONFIGFILE}.gz - most often KERNEL will
# simply be "netbsd". If we don't find the "config" line, assume the
# kernel will be "netbsd" (some config files are simple additions on
# GENERIC, and just include it).
# This target builds the kernels specified by each port. A port may
# specify the following kernels:
#
# KERNEL_SETS The list of kernels that will be
# packaged into sets, named
# kern-${kernel}.tgz. These kernels
# are also placed in the binary/kernels
# area of the release package as
# netbsd-${kernel}.gz.
#
# EXTRA_KERNELS Additional kernels to place in the
# binary/kernels area of the release
# package as netbsd-${kernel}.gz, but
# which are not placed into sets. This
# allows a port to provide e.g. a netbootable
# installation kernel containing a ramdisk.
#
# BUILD_KERNELS Additional kernels to build which are
# not placed into sets nor into the
# binary/kernels area of the release
# package. These are typically kernels
# that are built for inclusion only in
# installation disk/CD-ROM/tape images.
#
GETKERNELAWK= awk '/^config/ {print $$2; found=1} \
END{ if (found == 0) print "netbsd"; }'
@ -354,24 +362,26 @@ GETKERNELAWK= awk '/^config/ {print $$2; found=1} \
.if !target(snap_kern)
snap_kern:
.ifndef KERNELS_DONE
.for configfile in GENERIC ${EXTRA_KERNELS} ${BUILD_KERNELS}
.for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS} ${BUILD_KERNELS}
cd ${KERNCONFDIR} && ${CONFIG} \
-b ${KERNOBJDIR}/${configfile:C/.*\///} -s ${KERNSRCDIR} ${configfile}
.ifndef UPDATE
cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} distclean
.endif
cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} depend && ${MAKE} ${_J}
.endfor # kernels
cd ${KERNOBJDIR}/GENERIC && \
tar cf - `${GETKERNELAWK} ${KERNCONFDIR}/GENERIC` |\
gzip -c -9 > ${RELEASEDIR}/binary/sets/kern.tgz
.for configfile in GENERIC ${EXTRA_KERNELS}
.endfor # build kernels
.for configfile in ${KERNEL_SETS}
cd ${KERNOBJDIR}/${configfile:C/.*\///} && \
tar cf - `${GETKERNELAWK} ${KERNCONFDIR}/${configfile}` | \
gzip -c -9 > ${RELEASEDIR}/binary/sets/kern-${configfile}.tgz
.endfor # make kernel sets
.for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS}
cd ${KERNOBJDIR}/${configfile:C/.*\///} && \
for kernel in `${GETKERNELAWK} \
${KERNCONFDIR}/${configfile:C/.*\///}` ; do \
gzip -c -9 < $${kernel} > \
${RELEASEDIR}/binary/kernel/$${kernel}.${configfile:C/.*\///}.gz ; done
.endfor # EXTRA_KERNELS
${RELEASEDIR}/binary/kernel/$${kernel}-${configfile:C/.*\///}.gz ; done
.endfor # place KERNEL_SETS kernels + EXTRA_KERNELS in binary/kernel/...
.endif # KERNELS_DONE
.endif # no target(snap_kern)

View File

@ -1,6 +1,9 @@
# $NetBSD: Makefile.inc,v 1.2 2001/05/28 18:21:13 he Exp $
# $NetBSD: Makefile.inc,v 1.3 2001/11/29 22:45:54 thorpej Exp $
KERNEL_SETS= GENERIC
BUILD_KERNELS+= INSTALL
INSTALLATION_DIRS+= installation/floppy \
installation/diskimage \
installation/instkernel \

View File

@ -1,11 +1,11 @@
# $NetBSD: Makefile.inc,v 1.14 2000/09/17 19:04:39 is Exp $
# $NetBSD: Makefile.inc,v 1.15 2001/11/29 22:45:54 thorpej Exp $
#
# etc.amiga/Makefile.inc -- amiga-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
EXTRA_KERNELS+=INSTALL INSTWDCPCM
KERNEL_SETS= GENERIC
EXTRA_KERNELS= INSTALL INSTWDCPCM
INSTALLATION_DIRS+= installation/miniroot \
installation/misc

View File

@ -1,8 +1,6 @@
# $NetBSD: Makefile.inc,v 1.2 2001/03/12 14:10:03 wiz Exp $
# $NetBSD: Makefile.inc,v 1.3 2001/11/29 22:45:54 thorpej Exp $
#
# etc.arm26/Makefile.inc -- arm26-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
EXTRA_KERNELS+= FOURMEG
KERNEL_SETS= GENERIC FOURMEG

View File

@ -1,12 +1,11 @@
# $NetBSD: Makefile.inc,v 1.10 2000/11/12 00:59:05 matt Exp $
# $NetBSD: Makefile.inc,v 1.11 2001/11/29 22:45:55 thorpej Exp $
#
# etc.arm32/Makefile.inc -- arm32-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
EXTRA_KERNELS+= A7000 CATS EBSA285 RISCPC SHARK
BUILD_KERNELS= A7INST CATSINST RPCINST SHARKINST
KERNEL_SETS= SHARK
BUILD_KERNELS= SHARKINST
INSTALLATION_DIRS+= installation/kernel \
installation/misc

View File

@ -1,11 +1,11 @@
# $NetBSD: Makefile.inc,v 1.7 2000/11/04 21:15:36 leo Exp $
# $NetBSD: Makefile.inc,v 1.8 2001/11/29 22:45:55 thorpej Exp $
#
# etc.atari/Makefile.inc -- atari-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
EXTRA_KERNELS+= ATARITT BOOT BOOTX FALCON HADES
KERNEL_SETS= GENERIC
EXTRA_KERNELS= ATARITT BOOT BOOTX FALCON HADES
INSTALLATION_DIRS+= installation/miniroot \
installation/misc

View File

@ -1,8 +1,5 @@
# $NetBSD: Makefile.inc,v 1.2 1999/02/05 03:01:51 cjs Exp $
# $NetBSD: Makefile.inc,v 1.3 2001/11/29 22:45:55 thorpej Exp $
#
# etc.bebox/Makefile.inc -- bebox-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
#EXTRA_KERNELS+=

View File

@ -1,11 +1,11 @@
# $NetBSD: Makefile.inc,v 1.8 2001/04/21 17:58:21 he Exp $
# $NetBSD: Makefile.inc,v 1.9 2001/11/29 22:45:56 thorpej Exp $
#
# etc.hp300/Makefile.inc -- hp300-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
EXTRA_KERNELS+= DISKLESS
KERNEL_SETS= GENERIC
EXTRA_KERNELS= DISKLESS
# Build the boot media and install notes and install them
snap_md_post:

View File

@ -1,7 +1,8 @@
# $NetBSD: Makefile.inc,v 1.3 2001/04/22 02:03:05 shin Exp $
# $NetBSD: Makefile.inc,v 1.4 2001/11/29 22:45:56 thorpej Exp $
EXTRA_KERNELS+= TX3912 TX3922
BUILD_KERNELS+= RAMDISK INSTALL_TX3912 INSTALL_TX3922
KERNEL_SETS= GENERIC TX3912 TX3922
BUILD_KERNELS= RAMDISK INSTALL_TX3912 INSTALL_TX3922
snap_md_post:
.ifndef UPDATE

View File

@ -1,14 +1,13 @@
# $NetBSD: Makefile.inc,v 1.29 2001/09/13 18:08:13 jdolecek Exp $
# $NetBSD: Makefile.inc,v 1.30 2001/11/29 22:45:56 thorpej Exp $
#
# etc.i386/Makefile.inc -- i386-specific etc Makefile targets
#
# These are packaged and distributed
EXTRA_KERNELS+= GENERIC_TINY GENERIC_LAPTOP GENERIC_DIAGNOSTIC GENERIC_PS2TINY
KERNEL_SETS= GENERIC GENERIC_TINY GENERIC_LAPTOP GENERIC_DIAGNOSTIC \
GENERIC_PS2TINY
BUILD_KERNELS= INSTALL INSTALL_SMALL INSTALL_TINY INSTALL_LAPTOP INSTALL_PS2
# These are for use by the bootfloppy construction tools
BUILD_KERNELS+= INSTALL INSTALL_SMALL INSTALL_TINY INSTALL_LAPTOP INSTALL_PS2
EXTRA_KERNEL_SETS=tiny laptop ps2tiny
INSTALLATION_DIRS += installation/misc
# mkisofs arguments to generate bootable iso image
@ -17,12 +16,6 @@ MKISOFS_FLAGS+= -b installation/floppy/boot-big.fs
# Tar up extra kernel sets.
# Build the boot floppies and install them
snap_md_post:
.for kernel in ${EXTRA_KERNEL_SETS}
uppername=`echo ${kernel} | tr 'a-z' 'A-Z'` && \
cd ${KERNOBJDIR}/GENERIC_$$uppername && \
tar cf - `${GETKERNELAWK} ${KERNCONFDIR}/GENERIC` |\
gzip -c -9 > ${RELEASEDIR}/binary/sets/kern-${kernel}.tgz
.endfor
.ifndef UPDATE
cd ${.CURDIR}/../distrib && ${MAKE} cleandir
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.7 2000/12/07 10:57:18 toddpw Exp $
# $NetBSD: Makefile.inc,v 1.8 2001/11/29 22:45:56 thorpej Exp $
#
# mac68k-specific release building goo
#
@ -8,8 +8,10 @@
# simply its corresponding config with "ncrscsi" commented out,
# and "sbc" uncommented.
#
BUILD_KERNELS?= INSTALL INSTALLSBC
EXTRA_KERNELS?= GENERICSBC
KERNEL_SETS= GENERIC GENERICSBC
BUILD_KERNELS= INSTALL INSTALLSBC
INSTALLATION_DIRS+= installation/instkernel

View File

@ -1,6 +1,9 @@
# $NetBSD: Makefile.inc,v 1.2 2000/06/12 23:04:36 matt Exp $
# $NetBSD: Makefile.inc,v 1.3 2001/11/29 22:45:57 thorpej Exp $
KERNEL_SETS= GENERIC
BUILD_KERNELS+= INSTALL GENERIC_MD
INSTALLATION_DIRS+= installation
snap_md_post:

View File

@ -1,13 +1,12 @@
# $NetBSD: Makefile.inc,v 1.2 2000/11/24 22:07:32 scw Exp $
# $NetBSD: Makefile.inc,v 1.3 2001/11/29 22:45:57 thorpej Exp $
#
# etc.mvme68k/Makefile.inc -- mvme68k-specific etc Makefile targets
#
# These are packaged and distributed
EXTRA_KERNELS+= VME147 VME162 VME167 VME172 VME177
KERNEL_SETS= GENERIC VME147 VME162 VME167 VME172 VME177
BUILD_KERNELS= RAMDISK
# These are for use by the bootfloppy construction tools
BUILD_KERNELS+= RAMDISK
INSTALLATION_DIRS += installation/miniroot
INSTALLATION_DIRS += installation/netboot
INSTALLATION_DIRS += installation/tapeimage

View File

@ -1,11 +1,11 @@
# $NetBSD: Makefile.inc,v 1.1 2001/08/22 18:34:48 matt Exp $
# $NetBSD: Makefile.inc,v 1.2 2001/11/29 22:45:57 thorpej Exp $
#
# etc.netwinder/Makefile.inc -- netwinder-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
#BUILD_KERNELS= INSTALL
KERNEL_SETS= GENERIC
#BUILD_KERNELS= INSTALL
#INSTALLATION_DIRS+= installation/kernel installation/misc

View File

@ -1,11 +1,8 @@
# $NetBSD: Makefile.inc,v 1.2 2001/03/26 10:27:15 tsutsui Exp $
# $NetBSD: Makefile.inc,v 1.3 2001/11/29 22:45:58 thorpej Exp $
# These are put in ${RELEASEDIR} by "make release" in distrib/sun3
# after it builds and patches in the installation ramdisk image.
BUILD_KERNELS+= INSTALL
KERNEL_SETS= GENERIC GENERIC_TINY
# These are just built and copied to the release area.
EXTRA_KERNELS+= GENERIC_TINY
BUILD_KERNELS= INSTALL
snap_md_post:
.ifndef UPDATE

View File

@ -1,11 +1,9 @@
# $NetBSD: Makefile.inc,v 1.1 2000/07/22 02:33:53 briggs Exp $
# $NetBSD: Makefile.inc,v 1.2 2001/11/29 22:45:58 thorpej Exp $
#
# etc.next68k/Makefile.inc -- next68k-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
EXTRA_KERNELS+=
KERNEL_SETS= GENERIC
# Build the release notes and install them
snap_md_post:

View File

@ -1,6 +1,8 @@
# $NetBSD: Makefile.inc,v 1.1 2001/10/15 16:22:53 uch Exp $
# $NetBSD: Makefile.inc,v 1.2 2001/11/29 22:45:58 thorpej Exp $
BUILD_KERNELS+= RAMDISK
KERNEL_SETS= GENERIC
BUILD_KERNELS= RAMDISK
snap_md_post:
.ifndef UPDATE

View File

@ -1,15 +1,11 @@
# $NetBSD: Makefile.inc,v 1.7 2000/09/10 22:04:27 matt Exp $
# $NetBSD: Makefile.inc,v 1.8 2001/11/29 22:45:59 thorpej Exp $
#
# etc.pmax/Makefile.inc -- pmax-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
#EXTRA_KERNELS+=
KERNEL_SETS= GENERIC
# Set this for any kernels beyond GENERIC and ${EXTRA_KERNELS} you
# need to build to make installation tools/media.
BUILD_KERNELS+=INSTALL RAMDISK
BUILD_KERNELS= INSTALL RAMDISK
# Add any extra release directories to be made
INSTALLATION_DIRS+=installation/diskimage installation/netboot

View File

@ -1,9 +1,12 @@
# $NetBSD: Makefile.inc,v 1.1 2001/01/16 16:53:57 nonaka Exp $
# $NetBSD: Makefile.inc,v 1.2 2001/11/29 22:45:59 thorpej Exp $
#
# etc.prep/Makefile.inc -- prep-specific etc Makefile targets
#
BUILD_KERNELS+= INSTALL
KERNEL_SETS= GENERIC
BUILD_KERNELS= INSTALL
INSTALLATION_DIRS+= installation
# mkisofs arguments to generate bootable iso image

View File

@ -1,8 +1,6 @@
# $NetBSD: Makefile.inc,v 1.2 2001/03/12 14:10:04 wiz Exp $
# $NetBSD: Makefile.inc,v 1.3 2001/11/29 22:46:00 thorpej Exp $
#
# etc.sandpoint/Makefile.inc -- sandpoint-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
#EXTRA_KERNELS+=
KERNEL_SETS= GENERIC

View File

@ -1,15 +1,11 @@
# $NetBSD: Makefile.inc,v 1.1 2001/11/20 16:41:44 soren Exp $
# $NetBSD: Makefile.inc,v 1.2 2001/11/29 22:46:00 thorpej Exp $
#
# etc.sgimips/Makefile.inc -- sgimips-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
EXTRA_KERNELS+=GENERIC_INDY
KERNEL_SETS= GENERIC GENERIC_INDY
# Set this for any kernels beyond GENERIC and ${EXTRA_KERNELS} you
# need to build to make installation tools/media.
BUILD_KERNELS+=RAMDISK
BUILD_KERNELS= RAMDISK
# Add any extra release directories to be made
INSTALLATION_DIRS+=installation/miniroot installation/netboot

View File

@ -1,14 +1,13 @@
# $NetBSD: Makefile.inc,v 1.22 2001/03/04 10:14:55 mrg Exp $
# $NetBSD: Makefile.inc,v 1.23 2001/11/29 22:46:00 thorpej Exp $
#
# etc.sparc/Makefile.inc -- sparc-specific etc Makefile targets
#
TOP= $(.CURDIR)/..
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
EXTRA_KERNELS+= GENERIC_SCSI3 GENERIC_SUN4U
BUILD_KERNELS+= INSTALL
KERNEL_SETS= GENERIC GENERIC_SCSI3 GENERIC_SUN4U
BUILD_KERNELS= INSTALL
# Add sparc installation directories
MD_INSTALLATION_DIRS= \

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.11 2001/08/26 05:31:28 eeh Exp $
# $NetBSD: Makefile.inc,v 1.12 2001/11/29 22:46:01 thorpej Exp $
#
# etc.sparc64/Makefile.inc -- sparc64-specific etc Makefile targets
#
@ -8,9 +8,8 @@ TOP= $(.CURDIR)/..
# Specify whether or not to build 32-bit libs.
MK32BITLIBS?=no
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
BUILD_KERNELS+= INSTALL
KERNEL_SETS= GENERIC
BUILD_KERNELS+= INSTALL
# Add sparc64 installation directories
MD_INSTALLATION_DIRS= \

View File

@ -1,20 +1,15 @@
# $NetBSD: Makefile.inc,v 1.1 2001/05/18 00:13:27 fredette Exp $
# $NetBSD: Makefile.inc,v 1.2 2001/11/29 22:46:01 thorpej Exp $
#
# etc.sun2/Makefile.inc -- sun2-specific etc Makefile targets
#
BIN3+= etc.sun2/ttyaction
# These are put in ${RELEASEDIR} by "make release" in distrib/sun2
# after it builds and patches in the installation ramdisk image.
BUILD_KERNELS= \
RAMDISK
KERNEL_SETS= GENERIC FOURMEG DISKLESS
# These are just built and copied to the release area.
EXTRA_KERNELS= \
INSTALL \
FOURMEG \
DISKLESS
EXTRA_KERNELS= INSTALL
BUILD_KERNELS= RAMDISK
snap_md_post:
# Build the ramdisk image and patch it into the ramdisk kernels.

View File

@ -1,20 +1,15 @@
# $NetBSD: Makefile.inc,v 1.11 2001/04/21 17:43:24 he Exp $
# $NetBSD: Makefile.inc,v 1.12 2001/11/29 22:46:01 thorpej Exp $
#
# etc.sun3/Makefile.inc -- sun3-specific etc Makefile targets
#
BIN3+= etc.sun3/ttyaction
# These are put in ${RELEASEDIR} by "make release" in distrib/sun3
# after it builds and patches in the installation ramdisk image.
BUILD_KERNELS= \
RAMDISK RAMDISK3X
KERNEL_SETS= GENERIC GENERIC3X DISKLESS DISKLESS3X
# These are just built and copied to the release area.
EXTRA_KERNELS= \
GENERIC3X \
INSTALL INSTALL3X \
DISKLESS DISKLESS3X
EXTRA_KERNELS= INSTALL INSTALL3X
BUILD_KERNELS= RAMDISK RAMDISK3X
snap_md_post:
# Build the ramdisk image and patch it into the ramdisk kernels.

View File

@ -1,11 +1,11 @@
# $NetBSD: Makefile.inc,v 1.9 2000/09/12 05:11:10 matt Exp $
# $NetBSD: Makefile.inc,v 1.10 2001/11/29 22:46:02 thorpej Exp $
#
# etc.vax/Makefile.inc -- vax-specific etc Makefile targets
#
#
# We need this to build the sysinst kernel.
BUILD_KERNELS+=INSTALL
KERNEL_SETS= GENERIC
BUILD_KERNELS= INSTALL
distribution: pcs750.bin

View File

@ -1,8 +1,6 @@
# $NetBSD: Makefile.inc,v 1.1 2001/06/13 14:53:29 simonb Exp $
# $NetBSD: Makefile.inc,v 1.2 2001/11/29 22:46:02 thorpej Exp $
#
# etc.walnut/Makefile.inc -- walnut-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
#EXTRA_KERNELS+=
KERNEL_SETS= WALNUT

View File

@ -1,11 +1,11 @@
# $NetBSD: Makefile.inc,v 1.9 2000/11/28 03:18:18 minoura Exp $
# $NetBSD: Makefile.inc,v 1.10 2001/11/29 22:46:02 thorpej Exp $
#
# etc.x68k/Makefile.inc -- x68k-specific etc Makefile targets
#
# Set this for any kernels beyond GENERIC you want to include
# in the distribution.
BUILD_KERNELS+= INSTALL
KERNEL_SETS= GENERIC
BUILD_KERNELS= INSTALL
LOCALTIME= Japan