summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-07-27 17:14:56 +0000
committerjlam <jlam@pkgsrc.org>2006-07-27 17:14:56 +0000
commitcb7b7bfbd89f559cafd45820bf3b602a500e07e8 (patch)
tree1472d3e9619f150b071bd120d97ff62e4fc00503 /mk
parent3440a30b3f2aeff201b5d6ea364d7d0ec821b474 (diff)
downloadpkgsrc-cb7b7bfbd89f559cafd45820bf3b602a500e07e8.tar.gz
Replace this:
for i in `cmd`; do ...; done with this: cmd | while read i; do ...; done
Diffstat (limited to 'mk')
-rw-r--r--mk/fetch/fetch-list.mk27
1 files changed, 13 insertions, 14 deletions
diff --git a/mk/fetch/fetch-list.mk b/mk/fetch/fetch-list.mk
index e8525e62c6d..e6f676fd087 100644
--- a/mk/fetch/fetch-list.mk
+++ b/mk/fetch/fetch-list.mk
@@ -1,4 +1,4 @@
-# $NetBSD: fetch-list.mk,v 1.5 2006/07/27 16:06:27 jlam Exp $
+# $NetBSD: fetch-list.mk,v 1.6 2006/07/27 17:14:56 jlam Exp $
# Prints out a script to fetch all needed files (no checksumming).
.PHONY: fetch-list
@@ -18,19 +18,18 @@ fetch-list:
.if !target(fetch-list-recursive)
fetch-list-recursive:
- ${_PKG_SILENT}${_PKG_DEBUG} \
- for dir in `${MAKE} ${MAKEFLAGS} show-all-depends-dirs`; do \
- (cd ../../$$dir && \
- ${MAKE} ${MAKEFLAGS} fetch-list-one-pkg \
- | ${AWK} ' \
- /^[^#]/ { FoundSomething = 1 } \
- /^unsorted/ { gsub(/[[:space:]]+/, " \\\n\t") } \
- /^echo/ { gsub(/;[[:space:]]+/, "\n") } \
- { block[line_c++] = $$0 } \
- END { if (FoundSomething) \
- for (line = 0; line < line_c; line++) \
- print block[line] } \
- ') \
+ @${_DEPENDS_WALK_CMD} -r ${PKGPATH} | \
+ while read dir; do \
+ ( cd ../../$$dir && ${SETENV} ${PKGSRC_MAKE_ENV} \
+ ${MAKE} ${MAKEFLAGS} fetch-list-one-pkg | \
+ ${AWK} '/^[^#]/ { FoundSomething = 1 } \
+ /^unsorted/ { gsub(/[[:space:]]+/, " \\\n\t") } \
+ /^echo/ { gsub(/;[[:space:]]+/, "\n") } \
+ { block[line_c++] = $$0 } \
+ END { if (FoundSomething) \
+ for (line = 0; line < line_c; line++) \
+ print block[line] }' \
+ ); \
done
.endif # !target(fetch-list-recursive)