/[MITgcm]/MITgcm/tools/f90mkdepend
ViewVC logotype

Diff of /MITgcm/tools/f90mkdepend

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5 by jahn, Sat May 1 17:48:17 2010 UTC revision 1.6 by jahn, Mon May 3 14:35:01 2010 UTC
# Line 4  Line 4 
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).
# Line 18  for filename in *.F90 *.F *.h; do Line 18  for filename in *.F90 *.F *.h; do
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    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22