bsd.confs.mk: Support CONFGROUPS.yes
Align CONFGROUPS with other options like SUBDIRS and FILESGROUPS by
supporting the CONFGROUPS.yes option. This means logic like this:
.if ${MK_FOO} != "no"
CONFGROUPS+= FOO
.endif
can be replaced by:
CONFGROUPS.${MK_FOO}+= FOO
MFC after: 1 week
Reviewed by: imp
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D52923
This commit is contained in:
@@ -22,6 +22,14 @@ buildconfig: ${${group}}
|
||||
all: buildconfig
|
||||
. endif
|
||||
|
||||
# Take groups from both CONFGROUPS and CONFGROUPS.yes, to allow syntax like
|
||||
# CONFGROUPS.${MK_FOO}=FOO. Sort and uniq the list of groups in case of
|
||||
# duplicates.
|
||||
.if defined(CONFGROUPS) || defined(CONFGROUPS.yes)
|
||||
CONFGROUPS:=${CONFGROUPS} ${CONFGROUPS.yes}
|
||||
CONFGROUPS:=${CONFGROUPS:O:u}
|
||||
.endif
|
||||
|
||||
. for group in ${CONFGROUPS}
|
||||
. if defined(${group}) && !empty(${group})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user