1 # $NetBSD: bsd.utils.mk,v 1.8 2006/07/27 22:01:28 jlam Exp $
3 # This Makefile fragment is included by bsd.pkg.mk and defines utility
4 # and otherwise miscellaneous variables and targets.
7 # DEPENDS_TYPE is used by the "show-depends-pkgpaths" target and specifies
8 # which class of dependencies to output. The special value "all" means
9 # to output every dependency.
12 .if !empty(DEPENDS_TYPE:Mbuild) || !empty(DEPENDS_TYPE:Mall)
13 _ALL_DEPENDS+= ${BOOTSTRAP_DEPENDS} ${BUILD_DEPENDS}
15 .if !empty(DEPENDS_TYPE:Minstall) || !empty(DEPENDS_TYPE:Mpackage) || \
16 !empty(DEPENDS_TYPE:Mall)
17 _ALL_DEPENDS+= ${DEPENDS}
20 # _PKG_PATHS_CMD canonicalizes package paths so that they're relative to
21 # ${PKGSRCDIR} and also verifies that they exist within pkgsrc.
24 ${SETENV} ECHO=${TOOLS_ECHO:Q} PKGSRCDIR=${PKGSRCDIR:Q} \
25 PWD_CMD=${TOOLS_PWD_CMD:Q} TEST=${TOOLS_TEST:Q} \
26 ${SH} ${.CURDIR}/../../mk/scripts/pkg_path
28 .PHONY: show-depends-dirs show-depends-pkgpaths
29 show-depends-dirs show-depends-pkgpaths:
30 @${_PKG_PATHS_CMD} ${_ALL_DEPENDS:C/^[^:]*://:O:u}
32 # _DEPENDS_WALK_CMD holds the command (sans arguments) to walk the
33 # dependency graph for a package.
35 _DEPENDS_WALK_MAKEFLAGS?= ${MAKEFLAGS}
37 ${SETENV} ECHO=${TOOLS_ECHO:Q} MAKE=${MAKE:Q} \
38 MAKEFLAGS=${_DEPENDS_WALK_MAKEFLAGS:Q} \
39 PKGSRCDIR=${PKGSRCDIR:Q} TEST=${TOOLS_TEST:Q} \
40 ${AWK} -f ${.CURDIR}/../../mk/scripts/depends-depth-first.awk --