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:
parent
4c0874041f
commit
1f4e0ed969
@ -1,7 +1,13 @@
|
|||||||
# $FreeBSD$
|
# $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.
|
# Allow user to configure things that only effect src tree builds.
|
||||||
SRCCONF?= /etc/src.conf
|
SRCCONF?= /etc/src.conf
|
||||||
.if exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf"
|
.if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_)
|
||||||
.include "${SRCCONF}"
|
.include "${SRCCONF}"
|
||||||
|
_srcconf_included_:
|
||||||
.endif
|
.endif
|
||||||
|
@ -19,17 +19,15 @@ __DEFAULT_YES_OPTIONS = \
|
|||||||
FORMAT_EXTENSIONS \
|
FORMAT_EXTENSIONS \
|
||||||
KERNEL_SYMBOLS
|
KERNEL_SYMBOLS
|
||||||
|
|
||||||
__DEFAULT_NO_OPTIONS = \
|
# expanded inline from bsd.mkopt.mk:
|
||||||
|
|
||||||
# Kludge to allow a less painful transition. If MAKESYSPATH isn't defined,
|
.for var in ${__DEFAULT_YES_OPTIONS}
|
||||||
# assume we have a standard FreeBSD src tree layout and reach over and grab
|
.if !defined(MK_${var})
|
||||||
# bsd.mkopt.mk from there. If it is defined, trust it to point someplace sane
|
.if defined(WITHOUT_${var}) # WITHOUT always wins
|
||||||
# and include bsd.mkopt.mk from there. We need the !defined case to keep ports
|
MK_${var}:= no
|
||||||
# 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"
|
|
||||||
.else
|
.else
|
||||||
.include <bsd.mkopt.mk>
|
MK_${var}:= yes
|
||||||
.endif
|
.endif
|
||||||
|
.endif
|
||||||
|
.endfor
|
||||||
|
.undef __DEFAULT_YES_OPTIONS
|
||||||
|
@ -3,7 +3,19 @@
|
|||||||
# Part of a unified Makefile for building kernels. This part contains all
|
# Part of a unified Makefile for building kernels. This part contains all
|
||||||
# of the definitions that need to be before %BEFORE_DEPEND.
|
# 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 <bsd.compiler.mk>
|
||||||
.include "kern.opts.mk"
|
.include "kern.opts.mk"
|
||||||
|
|
||||||
|
@ -65,15 +65,10 @@ KMODLOAD?= /sbin/kldload
|
|||||||
KMODUNLOAD?= /sbin/kldunload
|
KMODUNLOAD?= /sbin/kldunload
|
||||||
OBJCOPY?= objcopy
|
OBJCOPY?= objcopy
|
||||||
|
|
||||||
# Note: we're really bsd.kmod.mk, so we have to allow src.opts.mk to be
|
# Grab all the options for a kernel build.
|
||||||
# optional. Include it if we can so we can get /etc/src.conf changes,
|
.include "kern.opts.mk"
|
||||||
# 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>
|
|
||||||
.include <bsd.init.mk>
|
.include <bsd.init.mk>
|
||||||
.include <bsd.compiler.mk>
|
.include <bsd.compiler.mk>
|
||||||
.include "kern.opts.mk"
|
|
||||||
|
|
||||||
.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S
|
.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user