diff options
author | jlam <jlam> | 2006-01-18 20:18:04 +0000 |
---|---|---|
committer | jlam <jlam> | 2006-01-18 20:18:04 +0000 |
commit | 8e93c0027a06679de4cbbe94a7b3693e9bdd1177 (patch) | |
tree | 529521541e01c07455092fefcfe895b1ec71d01a /mk/bsd.utils.mk | |
parent | e0f9486abb05836fef95ba925e75f9b39d50bef9 (diff) | |
download | pkgsrc-8e93c0027a06679de4cbbe94a7b3693e9bdd1177.tar.gz |
Move the following targets from bsd.pkg.mk to bsd.utils.mk:
show-depends-dirs
show-all-depends-dirs
show-all-depends-dirs-excl
While we're here, reimplement them using the new pkg_paths and
depends-depth-first.awk scripts. As a side effect, this speeds up
the execution of these targets by around 5-15% depending on the
complexity of the dependency graph.
NOTE: This *does* change the behavior of these targets slightly because
the output is now newline-separated instead of space-separated,
and the order of the output lines doesn't match the original
targets because the dependency graph is now walked depth-first
instead of breadth first.
Diffstat (limited to 'mk/bsd.utils.mk')
-rw-r--r-- | mk/bsd.utils.mk | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/mk/bsd.utils.mk b/mk/bsd.utils.mk index 45430b9a2b5..55d3709368b 100644 --- a/mk/bsd.utils.mk +++ b/mk/bsd.utils.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.utils.mk,v 1.3 2006/01/18 18:03:08 jlam Exp $ +# $NetBSD: bsd.utils.mk,v 1.4 2006/01/18 20:18:04 jlam Exp $ # # This Makefile fragment is included by bsd.pkg.mk and defines utility # and otherwise miscellaneous variables and targets. @@ -25,8 +25,8 @@ _PKG_PATHS_CMD= \ PWD_CMD=${TOOLS_PWD_CMD:Q} TEST=${TOOLS_TEST:Q} \ ${SH} ${.CURDIR}/../../mk/scripts/pkg_path -.PHONY: show-depends-pkgpaths -show-depends-pkgpaths: +.PHONY: show-depends-dirs show-depends-pkgpaths +show-depends-dirs show-depends-pkgpaths: @${_PKG_PATHS_CMD} ${_ALL_DEPENDS_PKGSRCDIRS:O:u} # _DEPENDS_WALK_CMD holds the command (sans arguments) to walk the @@ -38,3 +38,17 @@ _DEPENDS_WALK_CMD= \ MAKEFLAGS=${_DEPENDS_WALK_MAKEFLAGS:Q} \ PKGSRCDIR=${PKGSRCDIR:Q} TEST=${TOOLS_TEST:Q} \ ${AWK} -f ${.CURDIR}/../../mk/scripts/depends-depth-first.awk -- + +# show-all-depends-dirs prints a list of every dependency, implied and +# direct", of the current package, and includes the current package. +# +.PHONY: show-all-depends-dirs +show-all-depends-dirs: + @(${_DEPENDS_WALK_CMD} -r ${PKGPATH}) + +# show-all-depends-dirs-excl prints a list of every dependency, implied and +# direct", of the current package. +# +.PHONY: show-all-depends-dirs-excl +show-all-depends-dirs-excl: + @(${_DEPENDS_WALK_CMD} ${PKGPATH}) |