2014-05-17 01:47:06 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2014-05-17 20:31:34 +00:00
|
|
|
# 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.
|
|
|
|
|
2015-12-01 20:56:16 +00:00
|
|
|
.if !defined(_WITHOUT_SRCCONF)
|
2014-05-17 01:47:06 +00:00
|
|
|
# Allow user to configure things that only effect src tree builds.
|
|
|
|
SRCCONF?= /etc/src.conf
|
2016-04-22 20:31:29 +00:00
|
|
|
.if !empty(SRCCONF) && \
|
|
|
|
(exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && \
|
|
|
|
!target(_srcconf_included_)
|
2015-09-17 21:49:29 +00:00
|
|
|
|
|
|
|
# Validate that the user didn't try setting an env-only variable in
|
|
|
|
# their src.conf. This benefits from already including bsd.mkopt.mk.
|
|
|
|
.for var in ${__ENV_ONLY_OPTIONS}
|
|
|
|
__presrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}:Uno:Dyes}${WITH_${var}:Uno:Dyes}
|
|
|
|
.endfor
|
|
|
|
|
2015-05-30 15:08:52 +00:00
|
|
|
.sinclude "${SRCCONF}"
|
2014-07-28 23:36:21 +00:00
|
|
|
_srcconf_included_: .NOTMAIN
|
2015-09-17 21:49:29 +00:00
|
|
|
|
|
|
|
# Validate the env-only variables.
|
|
|
|
.for var in ${__ENV_ONLY_OPTIONS}
|
|
|
|
__postrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}:Uno:Dyes}${WITH_${var}:Uno:Dyes}
|
|
|
|
.if ${__presrcconf_${var}} != ${__postrcconf_${var}}
|
2015-09-17 21:51:48 +00:00
|
|
|
.error Option ${var} may only be defined in ${SRC_ENV_CONF}, environment, or make argument, not ${SRCCONF}.
|
2014-05-17 01:47:06 +00:00
|
|
|
.endif
|
2015-09-17 21:49:29 +00:00
|
|
|
.undef __presrcconf_${var}
|
|
|
|
.undef __postrcconf_${var}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.endif # SRCCONF
|
2015-12-01 20:56:16 +00:00
|
|
|
.endif
|
2015-06-19 14:56:24 +00:00
|
|
|
|
2015-06-13 19:20:56 +00:00
|
|
|
# tempting, but bsd.compiler.mk causes problems this early
|
2015-06-19 14:56:24 +00:00
|
|
|
# probably need to remove dependence on bsd.own.mk
|
2015-06-13 19:20:56 +00:00
|
|
|
#.include "src.opts.mk"
|