diff options
author | atatat <atatat> | 2003-06-14 18:52:46 +0000 |
---|---|---|
committer | atatat <atatat> | 2003-06-14 18:52:46 +0000 |
commit | 44113c2ddea8865514ddd26c4f4ba0b31dc4c4d3 (patch) | |
tree | 40af90af7c4e42120df05bec97cd6a923a3e091d /mk | |
parent | 7a37733642805c322820430a62aaa1ef4ce04c40 (diff) | |
download | pkgsrc-44113c2ddea8865514ddd26c4f4ba0b31dc4c4d3.tar.gz |
Add a ``show-needs-update'' target that checks each dependency to see
if it's up to date. For dependencies (including the current package)
that are not up to date (or are not installed), a one line note is
printed thusly:
% cd audio/xmradio/
% make show-needs-update
audio/mad => mad-0.14.2b => needs update to mad-0.14.2bnb1
audio/xmradio => (none) => needs install of xmradio-1.2
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index f8ddba8d1fe..bd097afa2fd 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1197 2003/06/14 16:53:00 agc Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1198 2003/06/14 18:52:46 atatat Exp $ # # This file is in the public domain. # @@ -1644,6 +1644,23 @@ show-installed-depends: . endif .endif +.if !target(show-needs-update) +show-needs-update: +. if defined(DEPENDS) + ${_PKG_SILENT}${_PKG_DEBUG} \ + for i in `${MAKE} show-all-depends-dirs`; do \ + cd ${_PKGSRCDIR}/$$i; \ + want=`make show-vars VARNAMES=PKGNAME`; \ + have=`${PKG_INFO} -e "$${want%-*}" || true`; \ + if [ -z "$$have" ]; then \ + echo "$$i => (none) => needs install of $$want"; \ + elif [ "$$have" != "$$want" ]; then \ + echo "$$i => $$have => needs update to $$want"; \ + fi; \ + done +. endif +.endif + .if !target(show-pkgsrc-dir) show-pkgsrc-dir: . if defined(PKG_FAIL_REASON) |