git: 0f5ed3c427ff - main - bsd.confs.mk: Support CONFGROUPS.yes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 08 Oct 2025 06:13:08 UTC
The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=0f5ed3c427fff845797c2af2aeceb5855f32a4f4 commit 0f5ed3c427fff845797c2af2aeceb5855f32a4f4 Author: Lexi Winter <ivy@FreeBSD.org> AuthorDate: 2025-10-08 06:07:10 +0000 Commit: Lexi Winter <ivy@FreeBSD.org> CommitDate: 2025-10-08 06:07:10 +0000 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 --- share/mk/bsd.confs.mk | 8 ++++++++ 1 file changed, 8 insertions(+) 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})