Skip to content
Snippets Groups Projects
Commit 1ff9d31c authored by Ger van Diepen's avatar Ger van Diepen
Browse files

bug 1144:

Generate dependencies of package groups
parent 7e176bf4
No related merge requests found
......@@ -26,8 +26,41 @@ find $rootdir -name configure.in > tmp.fil
egrep '^lofar_' `cat tmp.fil` | \
sed -e 's%.*/LOFAR/%LOFAR/%' -e 's/,.*//' -e 's/).*//' -e 's%/configure.in:lofar_% %' | \
egrep -v ' GENERAL$' | fgrep -v ' GENERAL(' | \
sed -e 's% PACKAGE(% LOFAR/%' -e 's% INTERNAL(% LOFAR/%' -e 's% EXTERNAL(% %' -e s'%(.*%%' | \
sort > finddep.uses
sed -e 's% PACKAGE(% LOFAR/%' -e 's% INTERNAL(% LOFAR/%' -e 's% EXTERNAL(% %' -e s'%(.*%%' > tmp.uses
# Find all high level packages containing a lofarconf.in, but not containing
# leaf packages.
rm -f tmp.out
touch tmp.out
for FIL in `find $rootdir -name lofarconf.in`
do
fildir=`dirname $FIL`
nm=`find $fildir -name configure.in`
if test "$nm" = ""; then
echo $fildir >> tmp.out
fi
done
# Add those packages to the dependencies.
for fildir in `cat tmp.out`
do
# Get the packages out of the lofarconf.in file. Remove comments.
pkgs=`awk '{print $1 $2;}' $fildir/lofarconf.in | sed -e 's/ *#.*//'`
for pkg in $pkgs
do
fildir=`echo $fildir | sed -e 's%.*/LOFAR/%%'`
# If pkg does not start with a slash, it is relative to this level.
pkgnm=$fildir/$pkg
case $pkg in
/*)
# Remove leading slash
pkgnm=`echo $pkg | sed 's%^/%%'`;;
esac
echo LOFAR/$fildir LOFAR/$pkgnm >> tmp.uses
done
done
# Sort the file on name.
sort tmp.uses > finddep.uses
# Make a reversed copy to get the 'used by' relation.
awk '{ print $2, $1 }' finddep.uses | sort > finddep.used
......@@ -46,7 +79,7 @@ do
done
done
sort tmp.out | uniq | sed -e 's/#/ /' > finddep.pkg
rm -r tmp.out tmp.fil
rm -f tmp.out tmp.fil tmp.uses
# Now 'expand' the uses and used file to get the relations for the
# higher level packages.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment