summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-01-19 17:14:02 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-01-19 17:14:02 +0000
commit659e40fa178d002142238da8f1a7ef2e0e0f086f (patch)
treeee12a90f0df6784e5aa6b2c87e74ca5db80358dd
parent49ba4f35bb537481914b8b0c2adf24df1baa3190 (diff)
Now reads in active thorns and generates a file suitable for make.thornlist.
Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@79 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--lib/sbin/config_parser.pl43
-rw-r--r--lib/sbin/interface_parser.pl9
2 files changed, 40 insertions, 12 deletions
diff --git a/lib/sbin/config_parser.pl b/lib/sbin/config_parser.pl
index df499d47..e451701f 100644
--- a/lib/sbin/config_parser.pl
+++ b/lib/sbin/config_parser.pl
@@ -53,7 +53,7 @@ require "$cctk_home/lib/sbin/create_c_stuff.pl";
require "$cctk_home/lib/sbin/create_fortran_stuff.pl";
require "$cctk_home/lib/sbin/GridFuncStuff.pl";
-%thorns = &create_thorn_list($activethorns);
+%thorns = &create_thorn_list($cctk_home, $activethorns);
foreach $thorn (keys %thorns)
{
@@ -108,15 +108,26 @@ foreach $line (@GFstuff)
print "$line\n";
}
+@make_thornlist = &CreateMakeThornlist(%thorns);
+
+foreach $line (@make_thornlist)
+{
+ print "$line\n";
+}
sub create_thorn_list
{
- local($activethorns) = @_;
+ local($cctk_home, $activethorns) = @_;
local(%thornlist);
local($thorn, $toolkit, $thorn_name);
open(ACTIVE, "<$activethorns") || die "Cannot open ActiveThorns file $activethorns !";
+ $thornlist{"Cactus"} = "$cctk_home/src";
+
+ print "cctk_home is $cctk_home\n";
+
+
while(<ACTIVE>)
{
s/thorn_//g;
@@ -134,7 +145,14 @@ sub create_thorn_list
-r "$cctk_home/toolkits/$thorn/interface.ccl" &&
-r "$cctk_home/toolkits/$thorn/schedule.ccl")
{
- $thornlist{"$thorn_name"} = "$cctk_home/toolkits/$thorn";
+ if( $thornlist{"$thorn_name"} )
+ {
+ print "Ignoring duplicate thorn $thorn_name\n";
+ }
+ else
+ {
+ $thornlist{"$thorn_name"} = "$cctk_home/toolkits/$thorn";
+ }
}
else
{
@@ -167,6 +185,25 @@ sub get_public_parameters
}
+sub CreateMakeThornlist
+{
+ local(%thorns) = @_;
+ local($thorn);
+ local($thornlist);
+
+ $thornlist = "THORNS =";
+ foreach $thorn (keys %thorns)
+ {
+ next if ($thorn =~ m:Cactus:);
+
+ $thorns{$thorn} =~ m:(.*)/(.*)/(.*):;
+
+ $thornlist .= " $2/$3";
+ }
+
+ return ("$thornlist", "");
+}
+
diff --git a/lib/sbin/interface_parser.pl b/lib/sbin/interface_parser.pl
index 0105c1bd..f6208402 100644
--- a/lib/sbin/interface_parser.pl
+++ b/lib/sbin/interface_parser.pl
@@ -1,14 +1,5 @@
#! /usr/bin/perl -w
-#require "parameter_parser.pl";
-
-
-#%implementations = ("flesh", "flesh", "test1", "test1", "test2", "test2");
-
-#%interface_database = create_interface_database(%implementations);
-
-#&print_interface_database(%interface_database);
-
#/*@@
# @routine create_interface_database
# @date Wed Sep 16 15:07:11 1998