Add support for specifying unsupported / broken options that override

any defaults or user specified actions on the command line. This would
be useful for specifying features that are always broken or that
cannot make sense on a specific architecture, like ACPI on pc98 or
EISA on !i386 (!x86 usage of EISA is broken and there's no supported
hardware that could have it in any event). Any items in
BROKEN_OPTIONS are forced to "no" regardless of other settings.
Clients are expected change BROKEN_OPTIONS with +=. It will not
be unset, so other parts of the build system can have visibility
into the options that are broken on this platform, though this
should be very rare.

Differential Revision: https://reviews.freebsd.org/D2009
This commit is contained in:
imp 2015-03-12 03:57:00 +00:00
parent 347ccfdcbd
commit 545ec5784e
2 changed files with 22 additions and 3 deletions

View File

@ -18,6 +18,10 @@
# after all this processing, allowing this file to be included
# multiple times with different lists.
#
# Other parts of the build system will set BROKEN_OPTIONS to a list
# of options that are broken on this platform. This will not be unset
# before returning. Clients are expected to always += this variable.
#
# Users should generally define WITH_FOO or WITHOUT_FOO, but the build
# system should use MK_FOO={yes,no} when it needs to override the
# user's desires or default behavior.
@ -58,3 +62,11 @@ MK_${var}:= no
.endif # !defined(MK_${var})
.endfor
.undef __DEFAULT_NO_OPTIONS
#
# MK_* options which are always no, usually because they are
# unsupported/badly broken on this architecture.
#
.for var in ${BROKEN_OPTIONS}
MK_${var}:= no
.endfor

View File

@ -82,6 +82,16 @@ MK_${var}:= no
.endfor
.undef __DEFAULT_NO_OPTIONS
#
# MK_* options which are always no, usually because they are
# unsupported/badly broken on this architecture.
#
.for var in ${BROKEN_OPTIONS}
MK_${var}:= no
.endfor
.undef BROKEN_OPTIONS
#end of bsd.mkopt.mk expanded inline.
#
# MK_*_SUPPORT options which default to "yes" unless their corresponding
# MK_* variable is set to "no".
@ -104,6 +114,3 @@ MK_${var}_SUPPORT:= yes
.endif
.endif
.endfor