take advantage of new target in bsd.pkg.mk to simplify the script and be
sure to not miss libtool depends.
This commit is contained in:
parent
6d09a84540
commit
a5051ede14
1 changed files with 4 additions and 18 deletions
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $NetBSD: printdepends,v 1.4 2000/12/29 15:56:26 dmcmahill Exp $
|
# $NetBSD: printdepends,v 1.5 2001/02/01 08:28:07 dmcmahill Exp $
|
||||||
#
|
#
|
||||||
# Print list of pkg dependencies suitable for tsort(1).
|
# Print list of pkg dependencies suitable for tsort(1).
|
||||||
# Start in /usr/pkgsrc.
|
# Start in /usr/pkgsrc.
|
||||||
|
@ -17,35 +17,21 @@ cwd=$PWD
|
||||||
#list=x11/gnome
|
#list=x11/gnome
|
||||||
#list='x11/xteddy x11/xsnow'
|
#list='x11/xteddy x11/xsnow'
|
||||||
|
|
||||||
mf=$cwd/.m.`hostname`.$$
|
|
||||||
# Makefile to print the DEPENDS' and BUILD_DEPENDS' directory parts
|
|
||||||
# bsd.pkg.mk is pulled in via the Makefile
|
|
||||||
cat >$mf <<EOF
|
|
||||||
bla:
|
|
||||||
@echo \${DEPENDS:C/^[^:]*://:C/:.*$//} \${BUILD_DEPENDS:C/^[^:]*://:C/:.*$//}
|
|
||||||
.include "Makefile"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
for pkgdir in $list
|
for pkgdir in $list
|
||||||
do
|
do
|
||||||
cd $pkgdir
|
cd $pkgdir
|
||||||
|
|
||||||
l=`make -f - <$mf bla` # XXX NOT -f $mf !
|
l=`make show-depends-dirs`
|
||||||
if [ "$l" = "" ]; then
|
if [ "$l" = "" ]; then
|
||||||
# No dependencies
|
# No dependencies
|
||||||
echo "$pkgdir $pkgdir"
|
echo "$pkgdir $pkgdir"
|
||||||
else
|
else
|
||||||
for reldir in $l
|
for depdir in $l
|
||||||
do
|
do
|
||||||
cd $reldir
|
echo "$depdir $pkgdir"
|
||||||
d=`dirname $PWD`
|
|
||||||
absdir=`basename $d`/`basename $PWD`
|
|
||||||
cd -
|
|
||||||
echo "$absdir $pkgdir"
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
cd $cwd
|
cd $cwd
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -f $mf
|
|
||||||
|
|
Loading…
Reference in a new issue