Module Name:    src
Committed By:   uebayasi
Date:           Sun Nov 30 15:53:29 UTC 2014

Modified Files:
        src: build.sh
        src/doc: BUILDING.mdoc
        src/etc: Makefile
        src/share/mk: bsd.README bsd.ioconf.mk

Log Message:
Add a new build make variable, CONFIGOPTS, which is passed to config(1)
when building kernels.  Revert "mkernel=*" and "mkernels" in favor of
this option.

Diff posted on source-changes-d@, approved by (null).


To generate a diff of this commit:
cvs rdiff -u -r1.304 -r1.305 src/build.sh
cvs rdiff -u -r1.109 -r1.110 src/doc/BUILDING.mdoc
cvs rdiff -u -r1.421 -r1.422 src/etc/Makefile
cvs rdiff -u -r1.336 -r1.337 src/share/mk/bsd.README
cvs rdiff -u -r1.4 -r1.5 src/share/mk/bsd.ioconf.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.304 src/build.sh:1.305
--- src/build.sh:1.304	Sun Nov 16 06:08:13 2014
+++ src/build.sh	Sun Nov 30 15:53:29 2014
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.304 2014/11/16 06:08:13 uebayasi Exp $
+#	$NetBSD: build.sh,v 1.305 2014/11/30 15:53:29 uebayasi Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1029,8 +1029,6 @@ Usage: ${progname} [-EhnorUuxy] [-a arch
                         file \`conf'
     releasekernel=conf  Install kernel built by kernel=conf to RELEASEDIR.
     kernels             Build all kernels
-    mkernels            Build all kernels in modular build
-    mkernel=conf        Build kernel with config file \`conf' in modular build
     installmodules=idir Run "make installmodules" to \`idir' to install all
                         kernel modules.
     modules             Build kernel modules.
@@ -1321,7 +1319,7 @@ parseoptions()
 			exit $?
 			;;
 
-		kernel=*|releasekernel=*|kernel.gdb=*|mkernel=*)
+		kernel=*|releasekernel=*|kernel.gdb=*)
 			arg=${op#*=}
 			op=${op%%=*}
 			[ -n "${arg}" ] ||
@@ -1350,7 +1348,6 @@ parseoptions()
 		iso-image-source|\
 		iso-image|\
 		kernels|\
-		mkernels|\
 		live-image|\
 		makewrapper|\
 		modules|\
@@ -1872,7 +1869,7 @@ createmakewrapper()
 	eval cat <<EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.304 2014/11/16 06:08:13 uebayasi Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.305 2014/11/30 15:53:29 uebayasi Exp $
 # with these arguments: ${_args}
 #
 
@@ -1987,8 +1984,10 @@ buildkernel()
 	fi
 	[ -x "${TOOLDIR}/bin/${toolprefix}config" ] \
 	|| bomb "${TOOLDIR}/bin/${toolprefix}config does not exist. You need to \"$0 tools\" first."
-	${runcmd} "${TOOLDIR}/bin/${toolprefix}config" -b "${kernelbuildpath}" \
-		${configopts} -s "${TOP}/sys" "${kernelconfpath}" ||
+	CONFIGOPTS=$(getmakevar CONFIGOPTS)
+	${runcmd} "${TOOLDIR}/bin/${toolprefix}config" ${CONFIGOPTS} \
+		-b "${kernelbuildpath}" -s "${TOP}/sys" ${configopts} \
+		"${kernelconfpath}" ||
 	    bomb "${toolprefix}config failed for ${kernelconf}"
 	make_in_dir "${kernelbuildpath}" depend
 	make_in_dir "${kernelbuildpath}" all
@@ -2250,11 +2249,6 @@ main()
 			configopts="-D DEBUG=-g"
 			buildkernel "${arg}"
 			;;
-		mkernel=*)
-			arg=${op#*=}
-			configopts="-M"
-			buildkernel "${arg}"
-			;;
 		releasekernel=*)
 			arg=${op#*=}
 			releasekernel "${arg}"
@@ -2264,11 +2258,6 @@ main()
 			buildkernels
 			;;
 
-		mkernels)
-			configopts="-M"
-			buildkernels
-			;;
-
 		disk-image=*)
 			arg=${op#*=}
 			diskimage "${arg}"

Index: src/doc/BUILDING.mdoc
diff -u src/doc/BUILDING.mdoc:1.109 src/doc/BUILDING.mdoc:1.110
--- src/doc/BUILDING.mdoc:1.109	Sun Nov 16 06:10:31 2014
+++ src/doc/BUILDING.mdoc	Sun Nov 30 15:53:29 2014
@@ -1,4 +1,4 @@
-.\"	$NetBSD: BUILDING.mdoc,v 1.109 2014/11/16 06:10:31 uebayasi Exp $
+.\"	$NetBSD: BUILDING.mdoc,v 1.110 2014/11/30 15:53:29 uebayasi Exp $
 .\"
 .\" Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -1526,12 +1526,6 @@ file alongside of the kernel
 which contains a full symbol table and can be used for debugging
 (for example with a cross-gdb built by
 .Sy MKCROSSGDB ) .
-.It Sy mkernel Ns = Ns Ar kconf
-Build a new kernel in modular build.
-Similar to the above
-.Sy kernel Ns = Ns Ar kconf
-operation, but creates intermediate per-module relocatable objects and link
-them to the final kernel.
 .It Sy kernels
 This command will build all kernels defined in port specific release build
 procedure.
@@ -1539,10 +1533,6 @@ procedure.
 This command internally calls the
 .Sy kernel Ns = Ns Ar kconf
 operation for each found kernel configuration file.
-.It Sy mkernels
-Similar to the above
-.Sy kernels
-operation, but builds kernels in modular build.
 .It Sy modules
 This command will build kernel modules and install them into
 .Sy DESTDIR .

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.421 src/etc/Makefile:1.422
--- src/etc/Makefile:1.421	Sun Aug 10 05:56:36 2014
+++ src/etc/Makefile	Sun Nov 30 15:53:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.421 2014/08/10 05:56:36 matt Exp $
+#	$NetBSD: Makefile,v 1.422 2014/11/30 15:53:29 uebayasi Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -578,7 +578,7 @@ build_kernels: .PHONY
 .for configfile in ${ALL_KERNELS}					# {
 build_kernels: kern-${configfile}
 kern-${configfile}: .PHONY .MAKE
-	cd ${KERNCONFDIR} && ${TOOL_CONFIG} -s ${KERNSRCDIR} \
+	cd ${KERNCONFDIR} && ${TOOL_CONFIG} ${CONFIGOPTS} -s ${KERNSRCDIR} \
 	    -U DEBUG -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile}
 .if ${MKUPDATE} == "no"
 	cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} distclean

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.336 src/share/mk/bsd.README:1.337
--- src/share/mk/bsd.README:1.336	Sat Sep  6 12:12:32 2014
+++ src/share/mk/bsd.README	Sun Nov 30 15:53:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.336 2014/09/06 12:12:32 christos Exp $
+#	$NetBSD: bsd.README,v 1.337 2014/11/30 15:53:29 uebayasi Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -1436,6 +1436,8 @@ CLEANDIRFILES	Additional files to remove
 
 CLEANFILES	Additional files to remove for the clean and cleandir targets.
 
+CONFIGOPTS	Additional flags to config(1) when building kernels.
+
 COPTS		Additional flags to the compiler when creating C objects.
 
 COPTS.<fn>	Additional flags to the compiler when creating the

Index: src/share/mk/bsd.ioconf.mk
diff -u src/share/mk/bsd.ioconf.mk:1.4 src/share/mk/bsd.ioconf.mk:1.5
--- src/share/mk/bsd.ioconf.mk:1.4	Fri Sep 20 16:39:14 2013
+++ src/share/mk/bsd.ioconf.mk	Sun Nov 30 15:53:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.ioconf.mk,v 1.4 2013/09/20 16:39:14 pooka Exp $
+#	$NetBSD: bsd.ioconf.mk,v 1.5 2014/11/30 15:53:29 uebayasi Exp $
 #
 
 .include <bsd.own.mk>
@@ -18,7 +18,8 @@
 CONFIGDEP=${TOOL_CONFIG}
 .endif
 ioconf.c: ${IOCONF} ${CONFIGDEP}
-	${TOOL_CONFIG} -b ${.OBJDIR} -s ${S} ${IOCONFDIR:U${.CURDIR}}/${IOCONF}
+	${TOOL_CONFIG} ${CONFIGOPTS} -b ${.OBJDIR} -s ${S} \
+	    ${IOCONFDIR:U${.CURDIR}}/${IOCONF}
 	# config doesn't change the files if they're unchanged.  however,
 	# here we want to satisfy our make dependency, so force a
 	# timestamp update

Reply via email to