diff options
| author | Lexi Winter <ivy@FreeBSD.org> | 2025-10-08 06:07:10 +0000 |
|---|---|---|
| committer | Lexi Winter <ivy@FreeBSD.org> | 2025-10-08 06:07:10 +0000 |
| commit | 0f5ed3c427fff845797c2af2aeceb5855f32a4f4 (patch) | |
| tree | 77cb1afaa2d03ad2a10bf9117fe313652cb305da | |
| parent | fa6d67cd16b50a7a0be1f003cf1aa1f4064fc2c9 (diff) | |
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
| -rw-r--r-- | share/mk/bsd.confs.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk index 77b573c7e42c..e953e6d978dc 100644 --- a/share/mk/bsd.confs.mk +++ b/share/mk/bsd.confs.mk @@ -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}) |
