1 |
utke |
1.1 |
#!/bin/csh -f |
2 |
|
|
set fileName=${1:r} |
3 |
|
|
set awkScript=${2} |
4 |
|
|
echo ' MODULE '${fileName}_mod > ${fileName}_temp |
5 |
|
|
echo '#include "CPP_OPTIONS.h"' >> ${fileName}_temp |
6 |
|
|
echo '#include "CPP_EEOPTIONS.h"' >> ${fileName}_temp |
7 |
|
|
echo '#include "GMREDI_OPTIONS.h"' >> ${fileName}_temp |
8 |
|
|
if ( ${fileName} != 'SIZE' && ${fileName} != 'MNC_COMMON' && ${fileName} != 'EEPARAMS' ) then |
9 |
|
|
echo ' use SIZE_mod' >> ${fileName}_temp |
10 |
|
|
endif |
11 |
|
|
if ( ${fileName} != 'EEPARAMS' && ${fileName} != 'SIZE' && ${fileName} != 'MNC_COMMON' ) then |
12 |
|
|
echo ' use EEPARAMS_mod' >> ${fileName}_temp |
13 |
|
|
endif |
14 |
|
|
if ( ${fileName} != 'PARAMS' && ${fileName} != 'EEPARAMS' && ${fileName} != 'SIZE' && ${fileName} != 'MNC_COMMON' && ${fileName} != 'GAD' && ${fileName} != 'GRID' ) then |
15 |
|
|
echo ' use PARAMS_mod' >> ${fileName}_temp |
16 |
|
|
endif |
17 |
|
|
#echo awk -f ${awkScript} ${fileName}.h |
18 |
|
|
awk -f ${awkScript} ${fileName}.h | grep -v mpif.h >> ${fileName}_temp |
19 |
|
|
echo ' END MODULE' ${fileName}_mod >> ${fileName}_temp |
20 |
|
|
cp ${fileName}_temp ${fileName}_mod.FF90 |
21 |
|
|
\rm ${fileName}_temp |