git: e757a92282fc - main - bsd.man.mk: Support MANGROUPS.yes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Oct 2025 10:43:00 UTC
The branch main has been updated by ivy:
URL: https://cgit.FreeBSD.org/src/commit/?id=e757a92282fcd064c82cf2685dde4730743fc425
commit e757a92282fcd064c82cf2685dde4730743fc425
Author: Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2025-10-17 10:40:39 +0000
Commit: Lexi Winter <ivy@FreeBSD.org>
CommitDate: 2025-10-17 10:42:51 +0000
bsd.man.mk: Support MANGROUPS.yes
Similar to SUBDIR and CONFGROUPS, this allows the use of
MANGROUPS.${MK_FOO}, simplifying Makefile logic for optional
manpages.
MFC after: 3 seconds
Reviewed by: emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D53126
---
share/mk/bsd.man.mk | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk
index 0a3594e05d94..1591a3e0905e 100644
--- a/share/mk/bsd.man.mk
+++ b/share/mk/bsd.man.mk
@@ -97,6 +97,14 @@ manlinksinstall: .PHONY
all-man:
+# Take groups from both MANGROUPS and MANGROUPS.yes, to allow syntax like
+# MANGROUPS.${MK_FOO}=FOO. Sort and uniq the list of groups in case of
+# duplicates.
+.if defined(MANGROUPS) || defined(MANGROUPS.yes)
+MANGROUPS:=${MANGROUPS} ${MANGROUPS.yes}
+MANGROUPS:=${MANGROUPS:O:u}
+.endif
+
.for __group in ${MANGROUPS}
realmaninstall: realmaninstall-${__group}