aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2017-10-21 01:07:23 +0800
committerbdrewery <bdrewery@FreeBSD.org>2017-10-21 01:07:23 +0800
commit9865046eccfce336a86648f34566d11534f4053c (patch)
tree13f89d7a8fcd55510593f060e4cf43d6e76d6ddb /Mk
parenta50b31ad13cd2ead3379bb83b7b0c54208e9d1bd (diff)
downloadfreebsd-ports-gnome-9865046eccfce336a86648f34566d11534f4053c.tar.gz
freebsd-ports-gnome-9865046eccfce336a86648f34566d11534f4053c.tar.zst
freebsd-ports-gnome-9865046eccfce336a86648f34566d11534f4053c.zip
FLAVORS: Fix 'make clean' not respecting passed in FLAVOR.
With hat: portmgr
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 88a35396a5dd..b02960c31d76 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1061,6 +1061,10 @@ STAGEDIR?= ${WRKDIR}/stage
NOTPHONY?=
FLAVORS?=
FLAVOR?=
+# Store env FLAVOR for later
+.if !defined(_FLAVOR)
+_FLAVOR:= ${FLAVOR}
+.endif
# XXX: We have no real FLAVORS support in ports or tools yet.
#PORTS_FEATURES+= FLAVORS
MINIMAL_PKG_VERSION= 1.6.0
@@ -3748,7 +3752,12 @@ post-clean-noflavor:
clean: ${CLEAN_DEPENDENCIES}
.endif
-.for _f in ${FLAVORS}
+.if !empty(_FLAVOR)
+_CLEANFLAVORS= ${_FLAVOR}
+.else
+_CLEANFLAVORS= ${FLAVORS}
+.endif
+.for _f in ${_CLEANFLAVORS}
CLEAN_DEPENDENCIES=
.if !defined(NOCLEANDEPENDS)
CLEAN_DEPENDENCIES+= limited-clean-depends-${_f}