diff options
-rw-r--r-- | mk/bulk/printdepends | 28 | ||||
-rw-r--r-- | mk/bulk/printindex | 14 |
2 files changed, 27 insertions, 15 deletions
diff --git a/mk/bulk/printdepends b/mk/bulk/printdepends index 216d57de2e2..049034b529b 100644 --- a/mk/bulk/printdepends +++ b/mk/bulk/printdepends @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: printdepends,v 1.6 2001/02/17 16:45:10 wiz Exp $ +# $NetBSD: printdepends,v 1.7 2001/07/13 15:14:57 dmcmahill Exp $ # # Print list of pkg dependencies suitable for tsort(1). # Start in /usr/pkgsrc. @@ -19,17 +19,23 @@ cwd=$PWD for pkgdir in $list do - cd $pkgdir - - l=`make show-depends-dirs` - if [ "$l" = "" ]; then - # No dependencies - echo "$pkgdir $pkgdir" + if [ ! -d $pkgdir ]; then + echo "WARNING: the package directory $pkgdir is listed in" > /dev/stderr + echo $pkgdir | sed 's;/.*;/Makefile;g' > /dev/stderr + echo "but the directory does not exist. Please fix this!" > /dev/stderr else - for depdir in $l - do - echo "$depdir $pkgdir" - done + 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 fi cd $cwd done diff --git a/mk/bulk/printindex b/mk/bulk/printindex index 137cd8e662e..9f105612f49 100644 --- a/mk/bulk/printindex +++ b/mk/bulk/printindex @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: printindex,v 1.4 2001/03/31 04:09:58 dmcmahill Exp $ +# $NetBSD: printindex,v 1.5 2001/07/13 15:14:57 dmcmahill Exp $ # # # Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -56,9 +56,15 @@ list=`grep '^[[:space:]]*'SUBDIR */Makefile | sed 's,/Makefile.*=[[:space:]]*,/, for pkgdir in $list do - cd $pkgdir - pkgname=`make show-var VARNAME=PKGNAME` - echo "$pkgdir $pkgname " + if [ ! -d $pkgdir ]; then + echo "WARNING: the package directory $pkgdir is listed in" > /dev/stderr + echo $pkgdir | sed 's;/.*;/Makefile;g' > /dev/stderr + echo "but the directory does not exist. Please fix this!" > /dev/stderr + else + cd $pkgdir + pkgname=`make show-var VARNAME=PKGNAME` + echo "$pkgdir $pkgname " + fi cd $cwd done |