Ignore:
Timestamp:
Apr 26, 2012, 10:03:22 AM (13 years ago)
Author:
emillour
Message:

All GCMs:

  • Improved 'create_make_gcm' scripts: better control of wether files are identified as main programs or routines.

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/create_make_gcm

    r519 r634  
    150150      do
    151151         fili=`basename $i .F`
    152          test=` (  head $i | grep '      PROGRAM' ) `
     152         # Check if file is a routine or main program
     153         # i.e: look for the "program" keword preceeded by leading spaces
     154         test=` (  head $i | grep -i '^ *program' ) `
    153155         if [ "$test" = "" ] ; then
     156            # if it is not a main program, add it to the list
    154157            listlib=$listlib" "$fili
    155158         fi
     
    158161      do
    159162         fili=`basename $i .F90`
    160          test=` (  head $i | grep '      PROGRAM' ) `
     163         # Check if file is a routine or main program
     164         # i.e. look for "program" keyword (with possibly some leading spaces)
     165         test=` (  head $i | grep -i '^ \{0,\}program' ) `
    161166         if [ "$test" = "" ] ; then
     167            # if it is not a main program, add it to the list
    162168            listlib=$listlib" "$fili
    163169         fi
     
    228234         else
    229235         ## Fortran 90
    230            echo '       cd $(LOCAL_DIR); \'
    231236           if [ -f $fili.F90 ] ; then
    232237           ## Free Form Fortran 90
Note: See TracChangeset for help on using the changeset viewer.