diff options
author | dmcmahill <dmcmahill@pkgsrc.org> | 2001-07-13 15:14:57 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill@pkgsrc.org> | 2001-07-13 15:14:57 +0000 |
commit | 6b21173ecbf71cfa72e7a7e5daceafff4fea5996 (patch) | |
tree | 09fa7739023b7bc521ed5967e9c0592482eeb599 /mk | |
parent | 4c2989abc98fc096d0986ba07760e8ff0c95e701 (diff) | |
download | pkgsrc-6b21173ecbf71cfa72e7a7e5daceafff4fea5996.tar.gz |
if a package subdirectory is listed in the category makefile, but doesn't
exist, then spit out a big warning to stderr (since we often capture stdout
for other purposes) and don't try and descend to that directory.
Diffstat (limited to 'mk')
-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 |