Am 08.04.2022 um 00:43 schrieb Jason Bacon:
On 4/7/22 16:53, Greg Troxel wrote:Jason Bacon <jtocino%gmx.com@localhost> writes:On 4/7/22 09:19, Greg Troxel wrote:make show-depends-pkgpaths See mk/bsd.utils.mk and mk/scripts/depends-depth-first.awk I would like to see indentation, perhaps optional, basically 2 spaces before each package that is a dependency of dependency, and so on, but given that it's not a tree, that's harder.Note that show-depends does not recurse. I've wondered if there's a canonical way to get the full recursive list. In the past I've used the hack of just running make clean-depends.Yes, but I think show-depends-pkgpaths doesNetBSD netbsd9.acadix bacon ~/Pkgsrc/pkgsrc/biology/canu 1002: (pkgsrc): bmake show-depends [very few dependencies] NetBSD netbsd9.acadix bacon ~/Pkgsrc/pkgsrc/biology/canu 1003: (pkgsrc): bmake show-depends-pkgpaths [some more dependencies] NetBSD netbsd9.acadix bacon ~/Pkgsrc/pkgsrc/biology/canu 1004: (pkgsrc): bmake clean-depends ===> Cleaning for [really each dependency]
Thank you for the impressive example, showing the surprising differences. The target clean-depends is a good hint. I had a look at all occurrences of _DEPENDS_WALK_CMD, and none of them is intended to use as a query of its own. There is indeed a hacky, ugly way of listing all dependencies, without touching anything in mk/: $ bmake clean-depends RECURSIVE_MAKE='echo $$dir; :' (If you want to see how and why it works, have a look at mk/bsd.pkg.clean.mk.) There should be a cleaner way of listing all of a package's dependencies. My first idea was to define a target named 'show-all-depends', but that name is already used as part of 'show-all'. Therefore I suggest 'show-depends-all'. The implementation is trivial, to be added to mk/bsd.utils.mk: show-depends-all: .PHONY ${RUN} ${_DEPENDS_WALK_CMD} ${PKGPATH} # Support for an indented dependency tree would require additional # work in mk/scripts/depends-depth-first.mk. # $ bmake show-depends-all INDENT=' ' Roland