aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2018-03-13 02:19:29 +0800
committerbdrewery <bdrewery@FreeBSD.org>2018-03-13 02:19:29 +0800
commitd1e67be0065f86df8a8cf0d752bb59635834a1cb (patch)
tree1d2c3226839a0026f8f4a64eb7e07bdb1034a2ae /Mk
parentf7281f9d0cacecbab293f2a7309aa2b11b699ce3 (diff)
downloadfreebsd-ports-gnome-d1e67be0065f86df8a8cf0d752bb59635834a1cb.tar.gz
freebsd-ports-gnome-d1e67be0065f86df8a8cf0d752bb59635834a1cb.tar.zst
freebsd-ports-gnome-d1e67be0065f86df8a8cf0d752bb59635834a1cb.zip
FLAVORS: Fix several 'make *recursive' targets not passing along FLAVOR properly.
PR: 225659 comment #15 Approved by: portmgr (implicit)
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk88
1 files changed, 51 insertions, 37 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index ecb884caa453..f09d2dfdb142 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -4038,6 +4038,29 @@ DEV_WARNING+= "It looks like the ${d} depends line has an absolute port origin,
all-depends-list:
@${ALL-DEPENDS-LIST}
+_FLAVOR_RECURSIVE_SH= \
+ if [ -z "$${recursive_cmd}" ]; then \
+ ${ECHO_MSG} "_FLAVOR_RECURSIVE_SH requires recursive_cmd to be set to the recursive make target to run." >&2; \
+ ${FALSE}; \
+ fi; \
+ if [ "$${recursive_dirs-null}" = "null" ]; then \
+ ${ECHO_MSG} "_FLAVOR_RECURSIVE_SH requires recursive_dirs to be set to the directories to recurse." >&2; \
+ ${FALSE}; \
+ fi; \
+ for dir in $${recursive_dirs}; do \
+ case $${dir} in \
+ *@*) \
+ flavor=$${dir\#*@}; \
+ dir=$${dir%@*}; \
+ ;; \
+ esac; \
+ case $$dir in \
+ /*) ;; \
+ *) dir=${PORTSDIR}/$$dir ;; \
+ esac; \
+ (cd $$dir; ${SETENV} FLAVOR=$${flavor} ${MAKE} $${recursive_cmd}); \
+ done
+
# This script is shared among several dependency list variables. See file for
# usage.
DEPENDS-LIST= \
@@ -4051,6 +4074,7 @@ DEPENDS-LIST= \
${DEPENDS_SHOW_FLAVOR:D-f}
ALL-DEPENDS-LIST= ${DEPENDS-LIST} -r ${_UNIFIED_DEPENDS:Q}
+ALL-DEPENDS-FLAVORS-LIST= ${DEPENDS-LIST} -f -r ${_UNIFIED_DEPENDS:Q}
MISSING-DEPENDS-LIST= ${DEPENDS-LIST} -m ${_UNIFIED_DEPENDS:Q}
BUILD-DEPENDS-LIST= ${DEPENDS-LIST} "${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}"
RUN-DEPENDS-LIST= ${DEPENDS-LIST} "${LIB_DEPENDS} ${RUN_DEPENDS}"
@@ -4074,42 +4098,32 @@ limited-clean-depends:
.if !target(deinstall-depends)
deinstall-depends:
- @for dir in $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} deinstall); \
- done
+ @recursive_cmd="deinstall"; \
+ recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \
+ ${_FLAVOR_RECURSIVE_SH}
.endif
.if !target(fetch-specials)
fetch-specials:
@${ECHO_MSG} "===> Fetching all distfiles required by ${PKGNAME} for building"
- @for dir in ${_DEPEND_SPECIALS}; do \
- case $${dir} in \
- *@*) \
- flavor=$${dir#*@}; \
- dir=$${dir%@*}; \
- ;; \
- esac; \
- case $$dir in \
- /*) ;; \
- *) dir=${PORTSDIR}/$$dir ;; \
- esac; \
- (cd $$dir; ${SETENV} FLAVOR=$${flavor} ${MAKE} fetch); \
- done
+ @recursive_cmd="fetch"; \
+ recursive_dirs="${_DEPEND_SPECIALS}"; \
+ ${_FLAVOR_RECURSIVE_SH}
.endif
.if !target(fetch-recursive)
fetch-recursive:
@${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies"
- @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} fetch); \
- done
+ @recursive_cmd="fetch"; \
+ recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \
+ ${_FLAVOR_RECURSIVE_SH}
.endif
.if !target(fetch-recursive-list)
fetch-recursive-list:
- @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} fetch-list); \
- done
+ @recursive_cmd="fetch-list"; \
+ recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \
+ ${_FLAVOR_RECURSIVE_SH}
.endif
# Used by fetch-required and fetch-required list, this script looks
@@ -4174,9 +4188,9 @@ fetch-required-list: fetch-list
.if !target(checksum-recursive)
checksum-recursive:
@${ECHO_MSG} "===> Fetching and checking checksums for ${PKGNAME} and dependencies"
- @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} checksum); \
- done
+ @recursive_cmd="checksum"; \
+ recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \
+ ${_FLAVOR_RECURSIVE_SH}
.endif
# Dependency lists: build and runtime. Print out directory names.
@@ -4313,9 +4327,9 @@ actual-package-depends:
# Build packages for port and dependencies
package-recursive: package
- @for dir in $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} package-noinstall); \
- done
+ @recursive_cmd="package-noinstall"; \
+ recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \
+ ${_FLAVOR_RECURSIVE_SH}
# Show missing dependencies
missing:
@@ -4983,9 +4997,9 @@ config:
.if !target(config-recursive)
config-recursive:
@${ECHO_MSG} "===> Setting user-specified options for ${PKGNAME} and dependencies";
- @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} config-conditional); \
- done
+ @recursive_cmd="config-conditional"; \
+ recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \
+ ${_FLAVOR_RECURSIVE_SH}
.endif # config-recursive
.if !target(config-conditional)
@@ -5039,9 +5053,9 @@ showconfig: check-config
.if !target(showconfig-recursive)
showconfig-recursive:
@${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME} and dependencies";
- @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} showconfig); \
- done
+ @recursive_cmd="showconfig"; \
+ recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \
+ ${_FLAVOR_RECURSIVE_SH}
.endif # showconfig-recursive
.if !target(rmconfig)
@@ -5066,9 +5080,9 @@ rmconfig:
.if !target(rmconfig-recursive)
rmconfig-recursive:
@${ECHO_MSG} "===> Removing user-specified options for ${PKGNAME} and dependencies";
- @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} rmconfig); \
- done
+ @recursive_cmd="rmconfig"; \
+ recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \
+ ${_FLAVOR_RECURSIVE_SH}
.endif # rmconfig-recursive
.if !target(pretty-print-config)
* Update to 3.5sunpoet2018-10-192-5/+6 * Update to 9.2.1sunpoet2018-10-192-4/+4 * Update the Linphone stack and drop maintainership.tijl2018-10-185-0/+42 * Workaround textprof/kf5-syntax-hightlighting build failure.adridg2018-10-181-0/+3 * - Update to 0.37wen2018-10-182-5/+4 * - Update WWWamdmi32018-10-171-1/+1 * Update to 2018.10.14sunpoet2018-10-162-4/+4 * Update to 9.2.0sunpoet2018-10-162-6/+7 * Upgrade to 34.0.thierry2018-10-163-11/+54 * - Update to 0.17.5miwi2018-10-152-4/+4 * Update to 0.57.1sunpoet2018-10-152-6/+7 * Cosmetic changesunpoet2018-10-151-2/+3 * Cosmetic changesunpoet2018-10-151-2/+3 * Cosmetic changesunpoet2018-10-151-2/+3 * Update to 4.0.1sunpoet2018-10-152-7/+7 * qt5: Fix build on GCC based architectures.tcberner2018-10-142-4/+2 * textproc/py-orange3-text: Update 0.5.0 -> 0.5.1yuri2018-10-142-4/+4 * Update gtk-doc to 1.29.kwm2018-10-142-7/+6 * textproc/pecl-yaml: Fix build with PHP 7.3dbaio2018-10-142-1/+124 * Update to 2.16.0sunpoet2018-10-132-4/+4 * textproc/apache-solr upgrade to 7.4.0.mfechner2018-10-136-151/+212 * lang/rust: update to 1.29.2jbeich2018-10-133-3/+3 * Those ports are not compatible with php 7.3antoine2018-10-121-1/+1 * - Update to 1.44wen2018-10-122-4/+4 * - Update to 0.55wen2018-10-123-4/+6 * Update KDE Applications to 18.08.2tcberner2018-10-122-6/+6 * textproc/tagsoup: Update MASTER_SITES and WWWtobik2018-10-112-3/+5 * - Update to 1.43wen2018-10-112-4/+4 * textproc/py-citeproc-py: Correct WWWyuri2018-10-111-1/+1 * Sort PLISTsunpoet2018-10-111-2/+2 * Upgrade to 2.1.3.thierry2018-10-102-4/+4 * Sort PLISTsunpoet2018-10-101-1/+1 * Add LICENSE_FILEsunpoet2018-10-102-5/+7 * Add LICENSEsunpoet2018-10-102-5/+10 * Add LICENSE_FILEsunpoet2018-10-102-3/+6 * Fix *_DEPENDSsunpoet2018-10-101-5/+7 * Sort PLISTsunpoet2018-10-101-11/+11 * Sort PLISTsunpoet2018-10-101-8/+8 * - Update to 0.68wen2018-10-102-4/+4 * - Update to 0.08wen2018-10-102-4/+4 * - Update to 0.47wen2018-10-102-4/+4 * - Update to 1.101245wen2018-10-102-5/+5