4 |
# |
# |
5 |
# Generate some make file dependency entries for a Fortran 90 file that employs "use". |
# Generate some make file dependency entries for a Fortran 90 file that employs "use". |
6 |
# |
# |
7 |
# For every "use" statement, generate a dependency on tolower(modulename).o |
# For every "use" statement, generate a dependency on lowercase(modulename).o |
8 |
# |
# |
9 |
# Note: We assume that the name of a module and the same of source are the same. |
# Note: We assume that the name of a module and the same of source are the same. |
10 |
# The name of the source file should be all lower case (except for the extension). |
# The name of the source file should be all lower case (except for the extension). |
18 |
# quick check for "use" to speed up processing |
# quick check for "use" to speed up processing |
19 |
if grep -i '^ *use ' $filename > /dev/null; then |
if grep -i '^ *use ' $filename > /dev/null; then |
20 |
# extract module name in lower case |
# extract module name in lower case |
21 |
modreflist=$(grep -i '^ *use ' $filename | awk '{sub(/,.*/,"",$2); print tolower($2)}') |
modreflist=$(grep -i '^ *use ' $filename | awk '{print tolower($2)}' | sed 's/,.*$//') |
22 |
|
|
23 |
echo "$filename => $modreflist" >> f90mkdepend.log |
echo "$filename => $modreflist" >> f90mkdepend.log |
24 |
|
|