diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2021-06-01 15:04:25 +0800 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2021-06-01 15:16:35 +0800 |
commit | e70bedf4f71eda15307b550cefd028a5a4b0281a (patch) | |
tree | 0c1e0b484d7f122ab8c9935baf4e2434e3ff1323 | |
parent | bad84b3403f35e38153b86976e46a29ea1c30c9b (diff) | |
download | freebsd-ports-gnome-e70bedf4f71eda15307b550cefd028a5a4b0281a.tar.gz freebsd-ports-gnome-e70bedf4f71eda15307b550cefd028a5a4b0281a.tar.zst freebsd-ports-gnome-e70bedf4f71eda15307b550cefd028a5a4b0281a.zip |
Mk/bsd.port.mk: Don't pass up an empty flavor.
The classic way to handle flavors is to set:
FLAVORS= foo bar
FLAVOR?= ${FLAVORS:[0]}
And in that case, FLAVOR is only set if the variable is not defined. If
you pass an empty flavor using `FLAVOR=` then it remains empty after
that line. It can leads to some ports with complicated logic to assume
the wrong flavor is set.
PR: 256301
Reported by: avg
Differential Revision: https://reviews.freebsd.org/D30579
-rw-r--r-- | Mk/bsd.port.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 93318b02d332..e514bb7ffec1 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -4095,7 +4095,7 @@ _FLAVOR_RECURSIVE_SH= \ /*) ;; \ *) dir=${PORTSDIR}/$$dir ;; \ esac; \ - (cd $$dir; ${SETENV} FLAVOR=$${flavor} ${MAKE} $${recursive_cmd}); \ + (cd $$dir; ${SETENV} $${flavor:+FLAVOR=$${flavor}} ${MAKE} $${recursive_cmd}); \ done # This script is shared among several dependency list variables. See file for |