Mk/bsd.port.mk: Add FLAVOR_SUB

If defined, for each flavors it will create for the non active one:
PLIST_SUB=	FLAVORNAME="@comment " NO_FLAVOUNAME=""
and for the active one:
PLIST_SUB=	FLAVORNAME="" NO_FLAVOUNAME="@comment "

Same for SUB_LIST

Reviewed by:	manu, bdrewery, mat
Differential Revision:	https://reviews.freebsd.org/D32495
This commit is contained in:
Baptiste Daroussin 2021-10-14 16:34:04 +02:00
parent c9804b3416
commit 5c7b1f13e5

View file

@ -1545,6 +1545,12 @@ ${v}+= ${${FLAVOR}_${v}}
${v}= flavor "${FLAVOR}" ${${FLAVOR}_${v}}
.endif
.endfor
.if defined(FLAVORS_SUB)
PLIST_SUB+= ${FLAVORS:N${FLAVOR}:@v@${v:tu}="\@comment " NO_${v:tu}=""@}
PLIST_SUB+= ${FLAVOR:tu}="" NO_${FLAVOR:tu}="@comment "
SUB_LIST+= ${FLAVORS:N${FLAVOR}:@v@${v:tu}="\@comment " NO_${v:tu}=""@}
SUB_LIST+= ${FLAVOR:tu}="" NO_${FLAVOR:tu}="@comment "
.endif
.endif # defined(${FLAVOR})