From 81c1f4ecc073800693361e27477db2052f3e4320 Mon Sep 17 00:00:00 2001 From: allen Date: Thu, 21 Oct 1999 08:29:36 +0000 Subject: 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 --- lib/sbin/CreateParameterBindings.pl | 18 ++++++++++++++++-- 1 file 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,") + { + $dataout .= $_; + } + close IN; + + &WriteFile("CParameterStructNames.h",$dataout); + + # open(OUT, ">CParameters.h") || die "Cannot open CParameters.h"; $dataout = ""; $dataout .= "#include \"CParameterStructNames.h\"\n\n"; -- cgit v1.2.3