summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-10-21 08:29:36 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-10-21 08:29:36 +0000
commit81c1f4ecc073800693361e27477db2052f3e4320 (patch)
treed49243bad079a0c28396c3d240713b22062ff40a
parentf35850cadb89d27b399dd2c276af4c783f904147 (diff)
Now all files created by the CST are compared with those already
on disk, and only written if different. This means that recompilation times should now be a lot quicker. git-svn-id: http://svn.cactuscode.org/flesh/trunk@1076 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--lib/sbin/CreateParameterBindings.pl18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/sbin/CreateParameterBindings.pl b/lib/sbin/CreateParameterBindings.pl
index 79f551bb..53b658fd 100644
--- a/lib/sbin/CreateParameterBindings.pl
+++ b/lib/sbin/CreateParameterBindings.pl
@@ -551,7 +551,10 @@ $dataout .= "\#define _\U$thorn\E_PARAMETERS_H_\n\n";
# close OUT;
}
- open(OUT, "| perl $cctk_home/lib/sbin/c_file_processor.pl $top/config-data > CParameterStructNames.h") || die "Cannot create CParameterStructNames.h by running c_file_processor.pl";
+# Write this one to a temporary file and read it back in
+# Can probably do this better
+
+ open(OUT, "| perl $cctk_home/lib/sbin/c_file_processor.pl $top/config-data > CParameterStructNames_temp.h") || die "Cannot create CParameterStructNames.h by running c_file_processor.pl";
foreach $structure (keys %structures)
{
@@ -561,7 +564,18 @@ $dataout .= "\#define _\U$thorn\E_PARAMETERS_H_\n\n";
print OUT "\n";
close OUT;
-
+
+ open(IN,"<CParameterStructNames_temp.h");
+ $dataout = "";
+ while (<IN>)
+ {
+ $dataout .= $_;
+ }
+ close IN;
+
+ &WriteFile("CParameterStructNames.h",$dataout);
+
+
# open(OUT, ">CParameters.h") || die "Cannot open CParameters.h";
$dataout = "";
$dataout .= "#include \"CParameterStructNames.h\"\n\n";