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).
This commit is contained in:
parent
60e602f21b
commit
0a333665fa
25
build.sh
25
build.sh
@ -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] [-B buildid] [-C cdextras]
|
||||
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}"
|
||||
|
@ -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 .
|
||||
|
@ -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
|
||||
|
@ -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 for the cleandir target.
|
||||
|
||||
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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user