diff --git a/mlprec/mlc2mlh.sh b/mlprec/mlc2mlh.sh index 4687657d..6594ec19 100755 --- a/mlprec/mlc2mlh.sh +++ b/mlprec/mlc2mlh.sh @@ -2,6 +2,8 @@ hn=mld_const.h fn=mld_base_prec_type.F90 echo "/* This file was generated by a script using the $fn file as a basis. */" > $hn +echo '#ifndef MLD_CONST_H_' >> $hn +echo '#define MLD_CONST_H_' >> $hn echo '#ifdef __cplusplus' >> $hn echo 'extern "C" { ' >> $hn echo '#endif' >> $hn @@ -9,5 +11,6 @@ cat $fn | sed 's/=/= (/g;s/$/ )/g' | grep '\(^ *!\)\|parameter' | grep '_\>' echo '#ifdef __cplusplus' >> $hn echo '}' >> $hn echo '#endif' >> $hn +echo '#endif' >> $hn exit diff --git a/mlprec/mld_const.h b/mlprec/mld_const.h index 2192a170..1195fefc 100644 --- a/mlprec/mld_const.h +++ b/mlprec/mld_const.h @@ -1,4 +1,6 @@ /* This file was generated by a script using the mld_base_prec_type.F90 file as a basis. */ +#ifndef MLD_CONST_H_ +#define MLD_CONST_H_ #ifdef __cplusplus extern "C" { #endif @@ -102,3 +104,4 @@ extern "C" { #ifdef __cplusplus } #endif +#endif