summaryrefslogtreecommitdiff
path: root/mk/bulk/printdepends
blob: 216d57de2e2099095f1399118c0b86af7835305c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# $NetBSD: printdepends,v 1.6 2001/02/17 16:45:10 wiz Exp $
#
# Print list of pkg dependencies suitable for tsort(1).
# Start in /usr/pkgsrc.
#
# (c) Copyright 2000 Hubert Feyrer <hubertf@netbsd.org>.
#     All rights reserved.
#

# /usr/pkgsrc
cwd=$PWD

# List of all pkgs, from pkgsrc/*/Makefile
 list=`grep '^[[:space:]]*'SUBDIR */Makefile | sed 's,/Makefile.*=[[:space:]]*,/,'`
#list=`grep '^[^#].*'SUBDIR ma*/Makefile | sed 's,/Makefile.*= *,/,'`
#list=x11/gnome
#list='x11/xteddy x11/xsnow'

for pkgdir in $list
do
	cd $pkgdir

	l=`make show-depends-dirs`
	if [ "$l" = "" ]; then
		# No dependencies
		echo "$pkgdir $pkgdir"
	else
		for depdir in $l
		do
			echo "$depdir $pkgdir"
		done
	fi
	cd $cwd
done