diff options
author | minskim <minskim> | 2004-08-04 06:22:39 +0000 |
---|---|---|
committer | minskim <minskim> | 2004-08-04 06:22:39 +0000 |
commit | e0a8624a8eb23403cb8d6fff17f9b38fad899e90 (patch) | |
tree | c7d984f159440991d033af9725332dcfd9de2cd7 /mk | |
parent | 4756ecb686e2f68058af415e6d9ced066c6b76f5 (diff) | |
download | pkgsrc-e0a8624a8eb23403cb8d6fff17f9b38fad899e90.tar.gz |
Do not run xargs if its input is an empty string; xargs in Interix
executes the utility even in such a case. Based on the patch provided
by Hiramatsu Yoshifumi in PR pkg/25777.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 37823d682ed..d0fe24bd9b6 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1482 2004/08/04 02:56:01 jschauma Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1483 2004/08/04 06:22:39 minskim Exp $ # # This file is in the public domain. # @@ -4342,14 +4342,19 @@ print-pkg-size-this: # dependencies are all installed. .PHONY: print-pkg-size-depends print-pkg-size-depends: - @${MAKE} ${MAKEFLAGS} run-depends-list \ - | ${XARGS} -n 1 ${SETENV} ${PKG_BEST_EXISTS} \ - | ${SORT} -u \ - | ${XARGS} -n 256 ${SETENV} ${PKG_INFO} -qs \ - | ${AWK} -- 'BEGIN { print("0 "); } \ - /^[0-9]+$$/ { print($$1, " + "); } \ - END { print("p"); }' \ - | ${DC} + @pkglist=`${MAKE} ${MAKEFLAGS} run-depends-list`; \ + if [ "X$${pkglist}" != "X" ]; then \ + ${ECHO} $${pkglist} \ + | ${XARGS} -n 1 ${SETENV} ${PKG_BEST_EXISTS} \ + | ${SORT} -u \ + | ${XARGS} -n 256 ${SETENV} ${PKG_INFO} -qs \ + | ${AWK} -- 'BEGIN { print("0 "); } \ + /^[0-9]+$$/ { print($$1, " + "); } \ + END { print("p"); }' \ + | ${DC}; \ + else \ + ${ECHO} "0"; \ + fi ### |