diff options
author | sbrandt <sbrandt@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2012-06-18 17:48:27 +0000 |
---|---|---|
committer | sbrandt <sbrandt@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2012-06-18 17:48:27 +0000 |
commit | 0d07ac21bf7db6765b83ea1bc88f9f4f05d63af7 (patch) | |
tree | 4a411cf054e16707d91836e64c7cb666085689b3 /lib/sbin/CreateScheduleBindings.pl | |
parent | 47a6b6f908ad8f4607cb8e7830d8159522ce0947 (diff) |
Changes for ticket #768
Change per thorn -DTHORN_IS_xxx to a per thorn -I bindings/include/xxx
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4839 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/CreateScheduleBindings.pl')
-rw-r--r-- | lib/sbin/CreateScheduleBindings.pl | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/lib/sbin/CreateScheduleBindings.pl b/lib/sbin/CreateScheduleBindings.pl index 095d49dc..18657189 100644 --- a/lib/sbin/CreateScheduleBindings.pl +++ b/lib/sbin/CreateScheduleBindings.pl @@ -53,20 +53,11 @@ sub CreateScheduleBindings $file_list .= " Schedule$thorn.c"; $rsbuffer = &ScheduleCreateInterfaceFile($thorn, $rhinterface_db, $rhschedule_db); - &WriteFile("../include/${thorn}_Schedule.h",\$rsbuffer); - } - - @data = (); - foreach $thorn (split(' ',$rhinterface_db->{'THORNS'})) - { - push(@data, "#ifdef THORN\_IS\_$thorn"); - push(@data, "#include \"${thorn}_Schedule.h\""); - push(@data, '#endif'); - push(@data, ''); + &WriteFile("../include/${thorn}/cctk_ScheduleFunctions.h",\$rsbuffer); + if($thorn eq "Cactus") { + &WriteFile("../include/CactusBindings/cctk_ScheduleFunctions.h",\$rsbuffer); + } } - push(@data, "\n"); # workaround for perl 5.004_04 to add a trailing newline - $dataout = join ("\n", @data); - &WriteFile('../include/cctk_ScheduleFunctions.h',\$dataout); $rsbuffer = &ScheduleCreateBindings($rhinterface_db, $rhschedule_db); &WriteFile("BindingsSchedule.c", \$rsbuffer); @@ -115,7 +106,7 @@ sub ScheduleCreateInterfaceFile # Process each schedule block my @data = (); - push (@data, '#include "cctk_Arguments.h"'); + push (@data, "#include \"$thorn/cctk_Arguments.h\""); for (my $block = 0; $block < $rhschedule_db->{"\U$thorn\E N_BLOCKS"}; @@ -292,11 +283,13 @@ sub ScheduleCreateFile push(@data, ' @enddesc'); push(@data, '@@*/'); push(@data, ''); - push(@data, "#define THORN_IS_$thorn"); + #push(@data, "#define THORN_IS_$thorn"); + #push(@data, "#define CCTK_THORNSTRING \"$thorn\""); push(@data, ''); - push(@data, '#include "cctk.h"'); - push(@data, '#include "cctk_Parameters.h"'); + push(@data, "#include \"$thorn/cctk.h\""); + push(@data, "#include \"$thorn/CParameters.h\""); push(@data, '#include "cctki_ScheduleBindings.h"'); + push(@data, "#include \"$thorn/cctk_ScheduleFunctions.h\""); push(@data, ''); #push(@data, '/* prototypes for schedule bindings functions to be registered */'); #push(@data, '/* Note that this is a cheat, we just need a function pointer. */'); |