Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / mk / bsd.utils.mk
bloba2c7add3232df1e45ce9aa8b6bdf9b8986267bb2
1 # $NetBSD: bsd.utils.mk,v 1.9 2011/09/08 20:17:15 abs 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.
11 DEPENDS_TYPE?= all
12 .if !empty(DEPENDS_TYPE:Mbuild) || !empty(DEPENDS_TYPE:Mall)
13 _ALL_DEPENDS+= ${BOOTSTRAP_DEPENDS} ${BUILD_DEPENDS} ${TOOL_DEPENDS}
14 .endif
15 .if !empty(DEPENDS_TYPE:Minstall) || !empty(DEPENDS_TYPE:Mpackage) || \
16 !empty(DEPENDS_TYPE:Mall)
17 _ALL_DEPENDS+= ${DEPENDS}
18 .endif
20 # _PKG_PATHS_CMD canonicalizes package paths so that they're relative to
21 # ${PKGSRCDIR} and also verifies that they exist within pkgsrc.
23 _PKG_PATHS_CMD= \
24 ${PKGSRC_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 # XXX Need to handle TOOL_DEPENDS/BUILD_DEPENDS split and cross-compilation.
37 _DEPENDS_WALK_MAKEFLAGS?= ${MAKEFLAGS}
38 _DEPENDS_WALK_CMD= \
39 ${PKGSRC_SETENV} ECHO=${TOOLS_ECHO:Q} MAKE=${MAKE:Q} \
40 MAKEFLAGS=${_DEPENDS_WALK_MAKEFLAGS:Q} \
41 PKGSRCDIR=${PKGSRCDIR:Q} TEST=${TOOLS_TEST:Q} \
42 ${AWK} -f ${.CURDIR}/../../mk/scripts/depends-depth-first.awk --