1 |
#!/bin/csh -f |
2 |
foreach f ( $* ) |
3 |
echo 'converting '$f.h |
4 |
awk -f cb2m1.awk $f.h > ${f}_mod.FF90_temp.001 |
5 |
echo ' MODULE '${f}_mod > ${f}_mod.FF90_temp.002 |
6 |
echo '#include "CPP_OPTIONS.h"' >> ${f}_mod.FF90_temp.002 |
7 |
echo '#include "CPP_EEOPTIONS.h"' >> ${f}_mod.FF90_temp.002 |
8 |
if ( ${f} != 'SIZE' ) then |
9 |
echo ' use SIZE_mod' >> ${f}_mod.FF90_temp.002 |
10 |
endif |
11 |
if ( ${f} != 'EEPARAMS' && ${f} != 'SIZE') then |
12 |
echo ' use EEPARAMS_mod' >> ${f}_mod.FF90_temp.002 |
13 |
endif |
14 |
if ( ${f} != 'PARAMS' && ${f} != 'EEPARAMS' && ${f} != 'SIZE') then |
15 |
echo ' use PARAMS_mod' >> ${f}_mod.FF90_temp.002 |
16 |
endif |
17 |
cat ${f}_mod.FF90_temp.001 >> ${f}_mod.FF90_temp.002 |
18 |
echo ' END MODULE' ${f}_mod >> ${f}_mod.FF90_temp.002 |
19 |
cp ${f}_mod.FF90_temp.002 ${f}_mod.FF90 |
20 |
end |
21 |
\rm *_mod.FF90_temp.* |
22 |
|
23 |
foreach f ( *_mod.FF90 ) |
24 |
grep '^#' $f > ${f:r}.h_temp.001 |
25 |
echo ' USE '${f:r} >> ${f:r}.h_temp.001 |
26 |
cp ${f:r}.h_temp.001 ${f:r}.h |
27 |
end |
28 |
\rm *_mod.h_temp.* |