From 8ea8cb1b78fcc17797dfe67af0ca2f22fa846d47 Mon Sep 17 00:00:00 2001 From: allen Date: Sun, 18 Aug 2002 09:05:50 +0000 Subject: For the include mechanism, check that if something is used as source code, then it was actually included as source code. Fixed part of Cactus/1181 git-svn-id: http://svn.cactuscode.org/flesh/trunk@2957 17b73243-c579-4c4c-a9d2-2d5706c11dac --- lib/sbin/BuildHeaders.pl | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/sbin/BuildHeaders.pl b/lib/sbin/BuildHeaders.pl index 0b89eea5..71290784 100644 --- a/lib/sbin/BuildHeaders.pl +++ b/lib/sbin/BuildHeaders.pl @@ -38,10 +38,31 @@ sub BuildHeaders } } + + # Check consistency + foreach $addingthorn (split(" ",$interface_database{"THORNS"})) + { + print "Adding thorn $addingthorn\n"; + foreach $inc_file1 (split(" ",$interface_database{"\U$addingthorn ADD HEADER"})) + { + print " Adding headers $inc_file1\n"; + foreach $usingthorn (split(" ",$interface_database{"THORNS"})) + { + print " Using thorn $usingthorn\n"; + if ($interface_database{"\U$usingthorn USES SOURCE"} =~ $interface_database{"\U$addingthorn ADD HEADER $inc_file1 TO"}) + { + print " PROBLEM adding $interface_database{\"\U$addingthorn ADD HEADER $inc_file1 TO\"}\n"; + print " PROBLEM using $interface_database{\"\U$usingthorn USES SOURCE\"}\n"; + &CST_error(1,"$inc_file1 was added in $addingthorn as a header include but is being used as $interface_database{\"\U$addingthorn ADD HEADER $inc_file1 TO\"} in $usingthorn as a source code include",'',__LINE__,__FILE__); + } + } + } + } + + # Add the headers from thorns foreach $thorn (split(" ",$interface_database{"THORNS"})) { - $arrangement = $interface_database{"\U$thorn ARRANGEMENT"}; foreach $inc_file1 (split(" ",$interface_database{"\U$thorn ADD HEADER"})) @@ -50,7 +71,7 @@ sub BuildHeaders { $inc_file1 =~ s/ //g; $inc_file2 = $interface_database{"\U$thorn ADD HEADER $inc_file1 TO"}; - + # Write information to the global include file $data{"$inc_file2"} .= "/* Including header file $inc_file1 from $thorn */\n"; -- cgit v1.2.3