diff options
author | Ross Williams <ross@ross-williams.net> | 2021-11-30 12:11:12 +0000 |
---|---|---|
committer | Andriy Gapon <avg@FreeBSD.org> | 2021-11-30 12:37:50 +0000 |
commit | a50c18ba3174831be2a7ad5ad9d3c1410b043fd0 (patch) | |
tree | cc428601351151710aa579eb671e706a909f02b4 | |
parent | da29f8e254fd84a235e619f0f1c3e1135749905a (diff) | |
download | ports-a50c18ba3174831be2a7ad5ad9d3c1410b043fd0.tar.gz ports-a50c18ba3174831be2a7ad5ad9d3c1410b043fd0.zip |
bsd.port.mk: Do not pass FLAVOR in dependency make environment
The change introduced in bug 256301 (review D30579), which prevents
child make processes from receiving an empty FLAVOR variable when
FLAVOR should be unset, has the side effect of allowing any FLAVOR
already in the parent make process environment to propagate to the
child.
This revision prevents the FLAVOR from the parent make from
incorrectly propagating to the child during a recursive make.
Additionally, use "flavored" CURDIR in recursive_dirs variable
so that a correct FLAVOR is used for the top-most port as well.
Reviewed by: bapt
Approved by: bapt
Differential Revision: https://reviews.freebsd.org/D32324
-rw-r--r-- | Mk/bsd.port.mk | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 33179c1caf25..78961a9b6c31 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -4075,7 +4075,7 @@ _FLAVOR_RECURSIVE_SH= \ ${FALSE}; \ fi; \ for dir in $${recursive_dirs}; do \ - unset flavor; \ + unset flavor FLAVOR; \ case $${dir} in \ *@*/*) ;; \ *@*) \ @@ -4146,14 +4146,14 @@ fetch-specials: fetch-recursive: @${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies" @recursive_cmd="fetch"; \ - recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} .endif .if !target(fetch-recursive-list) fetch-recursive-list: @recursive_cmd="fetch-list"; \ - recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} .endif @@ -4220,7 +4220,7 @@ fetch-required-list: fetch-list checksum-recursive: @${ECHO_MSG} "===> Fetching and checking checksums for ${PKGNAME} and dependencies" @recursive_cmd="checksum"; \ - recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} .endif @@ -5018,7 +5018,7 @@ config: config-recursive: @${ECHO_MSG} "===> Setting user-specified options for ${PKGNAME} and dependencies"; @recursive_cmd="config-conditional"; \ - recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} .endif # config-recursive @@ -5074,7 +5074,7 @@ showconfig: check-config showconfig-recursive: @${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME} and its dependencies"; @recursive_cmd="showconfig"; \ - recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} .endif # showconfig-recursive @@ -5101,7 +5101,7 @@ rmconfig: rmconfig-recursive: @${ECHO_MSG} "===> Removing user-specified options for ${PKGNAME} and its dependencies"; @recursive_cmd="rmconfig"; \ - recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} .endif # rmconfig-recursive |