#!/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 . # 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