summaryrefslogtreecommitdiff
path: root/lib/sbin/CST
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-09-12 13:34:39 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-09-12 13:34:39 +0000
commit2a68fa85af1621b5bfb6a7f4bdaa5a399bc6ff08 (patch)
treeb4467373232219e8f40d2367f76afcf9faa118d9 /lib/sbin/CST
parent271a8184eda384df2df3271e696f2969d368989d (diff)
Another fix for the generation of the THORN_LINKLIST.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3401 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/CST')
-rw-r--r--lib/sbin/CST32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/sbin/CST b/lib/sbin/CST
index 3c5923e8..ba0cfd0e 100644
--- a/lib/sbin/CST
+++ b/lib/sbin/CST
@@ -6,7 +6,7 @@
# @desc
# Parses the the configuration files for thorns.
# @enddesc
-# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/sbin/CST,v 1.55 2003-09-08 08:56:29 tradke Exp $
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/sbin/CST,v 1.56 2003-09-12 13:34:39 tradke Exp $
#@@*/
# Global parameter to track the number of errors from the CST
@@ -343,11 +343,11 @@ sub CreateThornLinkList
my($thorns, $interface_database) = @_;
my($thorn);
my($implementation);
- my($lib, $liblist, $i, $j);
+ my($imp, $liblist, $i, $j);
my($cross_inherits);
- my(@anchestors, @libs, @liblist);
+ my(@anchestors, @implist, @liblist);
- @libs = ();
+ @implist = ();
$cross_inherits = 0;
foreach $thorn (keys %$thorns)
{
@@ -358,38 +358,38 @@ sub CreateThornLinkList
@anchestors = split (' ', $interface_database->{"IMPLEMENTATION \U$implementation\E ANCESTORS"});
if (@anchestors)
{
- for ($i = $j = 0; $i <= $#libs; $i++)
+ for ($i = $j = 0; $i <= $#implist; $i++)
{
- if ($libs[$i] =~ /^$implementation$/i)
+ if ($implist[$i] =~ /^$implementation$/i)
{
- splice (@libs, $i, 1, @anchestors, $implementation);
+ splice (@implist, $i, 1, @anchestors, $implementation);
$j = 1;
last;
}
}
- push (@libs, @anchestors, $implementation) if (! $j);
+ push (@implist, @anchestors, $implementation) if (! $j);
}
else
{
- unshift (@libs, $implementation);
+ unshift (@implist, $implementation);
}
- # add any thorns which this thorn requires to be compiled
- @requires = split (' ', $configuration_database->{"\U$thorn\E REQUIRES THORNS"});
- unshift (@libs, @requires) if (@requires);
-
$cross_inherits++
if ($interface_database->{"IMPLEMENTATION \U$implementation\E FRIENDS"});
}
# build the thorn liblist from the implementation list
@liblist = ();
- foreach $lib (@libs)
+ foreach $imp (@implist)
{
- push (@liblist, split (/\s/, $interface_database->{"IMPLEMENTATION \U$lib\E THORNS"}));
+ foreach $thorn (split (' ', $interface_database->{"IMPLEMENTATION \U$imp\E THORNS"}))
+ {
+ # also add any thorns which this thorn requires
+ push (@liblist, split (' ', $configuration_database->{"\U$thorn\E REQUIRES THORNS"}), $thorn);
+ }
}
- # remove duplicate thornlibs in the list, keeping the rightmost instance
+ # remove duplicate thorn instances from the list, only keeping the rightmost
for ($i = 0; $i <= $#liblist; $i++)
{
for ($j = $i + 1; $j <= $#liblist; )