diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-01-22 07:14:27 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-01-22 07:14:27 +0000 |
commit | 4f4f34392411089e5d52a6dfb280ea973106d529 (patch) | |
tree | c87251202ae342bac12939723c6dcdabf9f91035 | |
parent | 7b572e43010ad3d0323ff99d3e3fa0708e360fa5 (diff) |
Now creates all the c parameter stuff.
Code should do #include "cctk_parameters.h"
and then do
DECLARE_PARSER
at the top of any subroutine they want to have parameters in.
Do we want to change this to DECLARE_PARAMETERS or something like that ?
Note that this won't work until I've added some -Ds to the make commands for
C.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@102 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | lib/sbin/config_parser.pl | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/lib/sbin/config_parser.pl b/lib/sbin/config_parser.pl index c0868776..06b6d3ea 100644 --- a/lib/sbin/config_parser.pl +++ b/lib/sbin/config_parser.pl @@ -527,10 +527,10 @@ EOT print OUT <<EOT; -\#define DECLARE_PARSER \ -DECLARE_PUBLIC_PARAMETER_STRUCT_PARAMS \ -DECLARE_PROTECTED_\U$implementation\E_STRUCT_PARAMS \ -DECLARE_PRIVATE_\U$thorn\E_STRUCT_PARAMS \ +\#define DECLARE_PARSER \\ +DECLARE_PUBLIC_PARAMETER_STRUCT_PARAMS \\ +DECLARE_PROTECTED_\U$implementation\E_STRUCT_PARAMS \\ +DECLARE_PRIVATE_\U$thorn\E_STRUCT_PARAMS \\ EOT foreach $line (@data) @@ -545,6 +545,30 @@ EOT close OUT; } + open(OUT, ">CParameters.h") || die "Cannot open CParameters.h"; + + foreach $thorn (split(" ",$interface_database{"THORNS"})) + { + print OUT "#if THISTHORN==$thorn\n"; + print OUT "#include \"$thorn"."_CParameters.h\"\n"; + print OUT "#endif\n\n"; + } + + close OUT; + + open(OUT, ">cctk_parameters.h") || die "Cannot open cctk_parameters.h"; + + print OUT "#ifdef CCODE\n"; + print OUT "#include \"CParameters.h\"\n"; + print OUT "#endif\n\n"; + + + print OUT "#ifdef FCODE\n"; + print OUT "#include \"FParameters.h\"\n"; + print OUT "#endif\n\n"; + + close OUT; + chdir $start_dir; } |