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.GENERIC/create_make_gcm

    r375 r634  
    153153      do
    154154         fili=`basename $i .F`
    155          test=` (  head $i | grep '      PROGRAM' ) `
     155         # Check if file is a routine or main program
     156         # i.e: look for the "program" keword preceeded by leading spaces
     157         test=` (  head $i | grep -i '^ *program' ) `
    156158         if [ "$test" = "" ] ; then
     159            # if it is not a main program, add it to the list
    157160            listlib=$listlib" "$fili
    158161         fi
     
    161164      do
    162165         fili=`basename $i .F90`
    163          test=` (  head $i | grep '      PROGRAM' ) `
     166         # Check if file is a routine or main program
     167         # i.e. look for "program" keyword (with possibly some leading spaces)
     168         test=` (  head $i | grep -i '^ \{0,\}program' ) `
    164169         if [ "$test" = "" ] ; then
     170            # if it is not a main program, add it to the list
    165171            listlib=$listlib" "$fili
    166172         fi
     
    238244              echo '    $(COMPILE90) $(LIBF)/'$diri'/'$trufile' ; \'
    239245           fi
     246           ## If a module, handle created module descriptor file
    240247           MODU=0; egrep -i '^ *module ' $trufile> /dev/null 2>&1 && MODU=1
    241248            if [ "$MODU" -eq '1' -a "$CRAY" != '1' ] ; then
Note: See TracChangeset for help on using the changeset viewer.