git: b908f6c45e02 - main - bsd.mkopt.mk: Add REQUIRED_OPTIONS list
Date: Tue, 20 Jun 2023 00:23:28 UTC
The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=b908f6c45e0202deb86fc9bde1b07212924c05fc commit b908f6c45e0202deb86fc9bde1b07212924c05fc Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2023-06-17 20:08:37 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2023-06-20 00:23:09 +0000 bsd.mkopt.mk: Add REQUIRED_OPTIONS list Options on this list will be forced to 'yes'. This is intended for use as a transitional measure when an option is ceasing to be optional, before all of the associated make logic is removed. Differential Revision: https://reviews.freebsd.org/D40590 --- share/mk/bsd.mkopt.mk | 10 ++++++++++ share/mk/src.opts.mk | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk index 3c6675b402cc..33eed9c8bce6 100644 --- a/share/mk/bsd.mkopt.mk +++ b/share/mk/bsd.mkopt.mk @@ -8,6 +8,8 @@ # "yes", unless WITHOUT_FOO is defined, in which case it is set to # "no". # +# For each option FOO in __REQUIRED_OPTIONS, MK_FOO is set to "yes". +# # For each option FOO in __DEFAULT_NO_OPTIONS, MK_FOO is set to "no", # unless WITH_FOO is defined, in which case it is set to "yes". # @@ -52,6 +54,14 @@ MK_${var}:= yes .endfor .undef __DEFAULT_YES_OPTIONS +# +# MK_* options which are always yes, typically as a transitional +# step towards removing the options entirely. +# +.for var in ${__REQUIRED_OPTIONS} +MK_${var}:= yes +.endfor + # # MK_* options which default to "no". # diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 7b67a55f34b4..8120e23cb28b 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -53,6 +53,9 @@ __<src.opts.mk>__: # BROKEN was selected as the least imperfect one considered at the # time. Options are added to BROKEN_OPTIONS list on a per-arch basis. # At this time, there's no provision for mutually incompatible options. +# Options listed in 'REQUIRED_OPTIONS' will be hard-wired to 'yes'; this +# is intended as a transitional measure while options are in the process +# of being removed. __DEFAULT_YES_OPTIONS = \ ACCT \ @@ -213,6 +216,8 @@ __DEFAULT_NO_OPTIONS = \ SORT_THREADS \ ZONEINFO_LEAPSECONDS_SUPPORT \ +__REQUIRED_OPTIONS = \ + # LEFT/RIGHT. Left options which default to "yes" unless their corresponding # RIGHT option is disabled. __DEFAULT_DEPENDENT_OPTIONS= \