The time is not yet ripe to break the lack of dependencies between

src/sys and the rest of the tree for builds.
o eliminate including bsd.mkopts.mk for the moment in kern.opts.mk
o No need to include src.opts.mk at all anymore. The reasons for it
  are now coverted in sys.mk and src.sys.mk.
This commit is contained in:
Warner Losh 2014-05-17 20:31:34 +00:00
parent 4c0874041f
commit 1f4e0ed969
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=266349
4 changed files with 31 additions and 20 deletions

View File

@ -1,7 +1,13 @@
# $FreeBSD$
# Note: This file is also duplicated in the sys/conf/kern.pre.mk so
# it will always grab SRCCONF, even if it isn't being built in-tree
# to preserve historical (and useful) behavior. Changes here need to
# be reflected there so SRCCONF isn't included multiple times.
# Allow user to configure things that only effect src tree builds.
SRCCONF?= /etc/src.conf
.if exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf"
.if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_)
.include "${SRCCONF}"
_srcconf_included_:
.endif

View File

@ -19,17 +19,15 @@ __DEFAULT_YES_OPTIONS = \
FORMAT_EXTENSIONS \
KERNEL_SYMBOLS
__DEFAULT_NO_OPTIONS = \
# expanded inline from bsd.mkopt.mk:
# Kludge to allow a less painful transition. If MAKESYSPATH isn't defined,
# assume we have a standard FreeBSD src tree layout and reach over and grab
# bsd.mkopt.mk from there. If it is defined, trust it to point someplace sane
# and include bsd.mkopt.mk from there. We need the !defined case to keep ports
# kernel modules working (though arguably they should define MAKESYSPATH). We
# need the latter case to keep the Jenkins testing harness working where they
# specifically use a non-standard layout, but do define MAKESYSPATH correctly.
.if !defined(MAKESYSPATH)
.include "../../share/mk/bsd.mkopt.mk"
.for var in ${__DEFAULT_YES_OPTIONS}
.if !defined(MK_${var})
.if defined(WITHOUT_${var}) # WITHOUT always wins
MK_${var}:= no
.else
.include <bsd.mkopt.mk>
MK_${var}:= yes
.endif
.endif
.endfor
.undef __DEFAULT_YES_OPTIONS

View File

@ -3,7 +3,19 @@
# Part of a unified Makefile for building kernels. This part contains all
# of the definitions that need to be before %BEFORE_DEPEND.
.include <src.opts.mk>
# Allow user to configure things that only effect src tree builds.
# Note: This is duplicated from src.sys.mk to ensure that we include
# /etc/src.conf when building the kernel. Kernels can be built without
# the rest of /usr/src, but they still always process SRCCONF even though
# the normal mechanisms to prevent that (compiling out of tree) won't
# work. To ensure they do work, we have to duplicate thee few lines here.
SRCCONF?= /etc/src.conf
.if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_)
.include "${SRCCONF}"
_srcconf_included_:
.endif
.include <bsd.own.mk>
.include <bsd.compiler.mk>
.include "kern.opts.mk"

View File

@ -65,15 +65,10 @@ KMODLOAD?= /sbin/kldload
KMODUNLOAD?= /sbin/kldunload
OBJCOPY?= objcopy
# Note: we're really bsd.kmod.mk, so we have to allow src.opts.mk to be
# optional. Include it if we can so we can get /etc/src.conf changes,
# if we're in the tree. If we can't include it that's OK. kern.opts.mk
# has all the kernel options in it, and should be included after src.opts.mk
# so it picks everything up.
.sinclude <src.opts.mk>
# Grab all the options for a kernel build.
.include "kern.opts.mk"
.include <bsd.init.mk>
.include <bsd.compiler.mk>
.include "kern.opts.mk"
.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S