pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sat Apr  9 00:46:12 UTC 2022

Modified Files:
        pkgsrc/mk: bsd.utils.mk
        pkgsrc/mk/depends: bsd.depends.mk

Log Message:
mk: add show-depends-all

Previously, there was no easy way to list all dependencies of a package.
The target show-depends only lists the direct missing dependencies, the
target show-depends-dirs lists all direct dependencies, but neither
lists the indirect dependencies as well.  The newly added target
show-depends-all includes the indirect dependencies.

While here, document the existing targets since they differ subtly.

https://mail-index.netbsd.org/pkgsrc-users/2022/04/07/msg035444.html


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/mk/bsd.utils.mk
cvs rdiff -u -r1.30 -r1.31 pkgsrc/mk/depends/bsd.depends.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/bsd.utils.mk
diff -u pkgsrc/mk/bsd.utils.mk:1.12 pkgsrc/mk/bsd.utils.mk:1.13
--- pkgsrc/mk/bsd.utils.mk:1.12 Thu Jan 25 00:33:56 2018
+++ pkgsrc/mk/bsd.utils.mk      Sat Apr  9 00:46:12 2022
@@ -1,13 +1,28 @@
-# $NetBSD: bsd.utils.mk,v 1.12 2018/01/25 00:33:56 joerg Exp $
+# $NetBSD: bsd.utils.mk,v 1.13 2022/04/09 00:46:12 rillig Exp $
 #
 # This Makefile fragment is included by bsd.pkg.mk and defines utility
 # and otherwise miscellaneous variables and targets.
 #
 
-# DEPENDS_TYPE is used by the "show-depends-pkgpaths" target and specifies
-# which class of dependencies to output.  The special value "all" means
-# to output every dependency.
+# DEPENDS_TYPE
+#      Used by the "show-depends-pkgpaths" target to specify which
+#      class of direct dependencies to output.  The special value "all"
+#      means to output every dependency.
+#
+#      Possible:
+#              all             = build
+#                              + TEST_DEPENDS (if PKGSRC_RUN_TEST)
+#                              + install
+#              build           = BOOTSTRAP_DEPENDS
+#                              + TOOL_DEPENDS
+#                              + BUILD_DEPENDS
+#              install         = DEPENDS
+#              package         XXX: same as install?
 #
+#      Default:
+#              all
+#
+# Keywords: depends dependencies
 DEPENDS_TYPE?=  all
 .if !empty(DEPENDS_TYPE:Mbuild) || !empty(DEPENDS_TYPE:Mall)
 _ALL_DEPENDS+= ${BOOTSTRAP_DEPENDS} ${BUILD_DEPENDS} ${TOOL_DEPENDS}
@@ -28,6 +43,20 @@ _PKG_PATHS_CMD=                                                              \
                PWD_CMD=${TOOLS_PWD_CMD:Q} TEST=${TOOLS_TEST:Q}         \
        ${SH} ${.CURDIR}/../../mk/scripts/pkg_path
 
+# show-depends-dirs:
+# show-depends-pkgpaths:
+#      Lists the PKGPATH of all direct dependencies of the current
+#      package.
+#
+#      Parameters:
+#              PKGSRC_RUN_TEST
+#                      Whether to include test dependencies as well.
+#
+#      See also:
+#              show-depends
+#              show-depends-all
+#
+# Keywords: depends dependencies
 .PHONY: show-depends-dirs show-depends-pkgpaths
 show-depends-dirs show-depends-pkgpaths:
        @${_PKG_PATHS_CMD} ${_ALL_DEPENDS:C/^[^:]*://:O:u}
@@ -43,3 +72,20 @@ _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-depends-all:
+#      Lists the PKGPATH of all direct or indirect dependencies of the
+#      current package.
+#
+#      Parameters:
+#              DEPENDS_TYPE
+#                      all, build, install or package
+#              PKGSRC_RUN_TEST
+#                      Whether to include test dependencies as well.
+#
+#      See also:
+#              show-depends
+#              show-depends-pkgpaths
+# Keywords: depends dependencies recursive indirect
+show-depends-all: .PHONY
+       ${RUN} ${_DEPENDS_WALK_CMD} ${PKGPATH}

Index: pkgsrc/mk/depends/bsd.depends.mk
diff -u pkgsrc/mk/depends/bsd.depends.mk:1.30 pkgsrc/mk/depends/bsd.depends.mk:1.31
--- pkgsrc/mk/depends/bsd.depends.mk:1.30       Tue May  7 19:36:44 2019
+++ pkgsrc/mk/depends/bsd.depends.mk    Sat Apr  9 00:46:12 2022
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.depends.mk,v 1.30 2019/05/07 19:36:44 rillig Exp $
+# $NetBSD: bsd.depends.mk,v 1.31 2022/04/09 00:46:12 rillig Exp $
 #
 # This Makefile fragment is included by bsd.pkg.mk and provides all
 # variables and targets related to dependencies.
@@ -129,12 +129,19 @@ depends-cookie:
        ${RUN}${TOUCH} ${TOUCH_ARGS} ${_COOKIE.depends}
 
 # show-depends:
-#      Prints a list of dependencies.
+#      Prints the dependencies that need to be installed before this
+#      package can be installed.  Each line of the output has the format
+#      'dependency:directory', as in DEPENDS and the related variables.
 #
 #      Command line variables:
 #
 #      VARNAME
 #              DEPENDS, BUILD_DEPENDS, TEST_DEPENDS, or TOOL_DEPENDS.
 #
+# See also:
+#      show-depends-pkgpaths   Prints the PKGPATH of all direct dependencies.
+#      show-depends-all        Prints the PKGPATH of all direct and
+#                              indirect dependencies.
+#
 # Keywords: depends dependencies
 show-depends: .PHONY _pkgformat-show-depends



Home | Main Index | Thread Index | Old Index