Changeset 1302 for trunk/LMDZ.COMMON/create_make_gcm
- Timestamp:
- Jun 26, 2014, 6:07:05 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/create_make_gcm
r1300 r1302 5 5 #set -xv 6 6 7 rm -f create_make_gcm.log8 7 9 8 machine=`hostname` 10 9 os=`uname` 11 10 gcm=`pwd` 11 logfile=$gcm/create_make_gcm.log 12 rm -f $logfile ; touch -f $logfile 12 13 libf=$gcm/libf 13 14 libo=$gcm/libo … … 51 52 echo "FILTRE = filtre" 52 53 echo "PHYS = " 53 echo "DYN = dyn "54 54 echo 'LIBPHY = $(LIBO)/libphy$(PHYS).a' 55 55 echo 'DIRMAIN=dyn$(DIM)d$(FLAG_PARA)' … … 59 59 echo 60 60 echo '# Les differentes librairies pour l"edition des liens:' 61 echo 62 echo 'dyn3d = $(LIBO)/libdyn3d.a $(LIBO)/lib$(FILTRE).a' 63 echo 'dyn3dpar = $(LIBO)/libdyn3dpar.a $(LIBO)/lib$(FILTRE).a' 64 echo 'dyn2d = $(LIBO)/libdyn2d.a' 65 echo 'dyn1d = $(LIBO)/libdyn1d.a' 66 echo 'L_DYN = -ldyn$(DIM)d$(FLAG_PARA)' 61 echo 'L_DYN = -ldyn$(DIM)d$(FLAG_PARA) -ldyn3d_common' 67 62 echo 'L_FILTRE = -l$(FILTRE)' 68 63 echo 'L_PHY = -lphy$(PHYS) ' 69 64 echo 'L_BIBIO = -lbibio' 70 echo 'L_DYN3D_COMMON = -ldyn3d_common'71 65 echo 'L_ADJNT =' 72 66 echo 'L_COSP = -lcosp' … … 100 94 echo 101 95 echo "PROG = code" 96 echo 'DYN = dyn$(DIM)d' 102 97 echo 103 98 #echo 'main : chimie $(DYN) bibio phys $(OPTION_DEP) ' 104 echo 'main : $(DYN) bibio dyn3d_commonphys $(OPTION_DEP) '99 echo 'main : $(DYN) bibio phys $(OPTION_DEP) ' 105 100 echo ' cd $(LIBO) ; $(RANLIB) lib*.a ; cd $(GCM) ;\' 106 101 echo ' cd $(LOCAL_DIR); \' … … 108 103 echo ' $(LINK) $(PROG).o -L$(LIBO) $(L_DYN) $(L_ADJNT) $(L_COSP) $(L_AERONOMARS) $(L_PHY) $(L_DYN) $(L_DYN3D_COMMON) $(L_BIBIO) $(L_DYN3D_COMMON) $(L_PHY) $(L_DYN) $(L_FILTRE) $(OPLINK) $(OPTION_LINK) -o $(LOCAL_DIR)/$(PROG).e ; $(RM) $(PROG).o ' 109 104 echo 110 echo 'dyn : $(LIBO)/libdyn$(DIM)d$(FLAG_PARA).a $(FILTRE)$(DIM)d'111 echo112 105 echo 'phys : $(LIBPHY)' 106 echo 'dyn3d : $(LIBO)/libdyn$(DIM)d$(FLAG_PARA).a $(LIBO)/lib$(FILTRE).a $(LIBO)/libdyn3d_common.a' 107 echo 'dyn2d : $(LIBO)/libdyn2d.a' 108 echo 'dyn1d :' 109 echo 113 110 echo 114 111 #echo 'chimie : $(LIBO)/libchimie.a' 115 112 echo 116 113 echo 'bibio : $(LIBO)/libbibio.a' 117 echo118 echo 'dyn3d_common : $(LIBO)/libdyn3d_common.a'119 114 echo 120 115 echo 'adjnt : $(LIBO)/libadjnt.a' … … 138 133 echo 139 134 cd $libf >/dev/null 2>&1 140 for diri in ` ls ` 141 do 135 for diri in ` ls ` ; do 136 142 137 if [ -d $diri ] ; then 143 138 if [ "`ls $diri/*.F $diri/*/*.F`" != "" ] || [ "`ls $diri/*.F90 $diri/*/*.F90`" != "" ] ; then … … 146 141 listlib="" 147 142 # Liste des fichiers .F et .F90 n'etant pas des programmes principaux 148 for fili in `ls $diri/*.F $diri/*/*.F` 149 do 143 for fili in `ls $diri/*.F $diri/*/*.F` ; do 150 144 # Check if file is a routine or main program 151 145 # i.e: look for the "program" keword preceeded by leading spaces … … 156 150 fi 157 151 done 158 for fili in `ls $diri/*.F90 $diri/*/*.F90` 159 do 152 for fili in `ls $diri/*.F90 $diri/*/*.F90` ; do 160 153 # Check if file is a routine or main program 161 154 # i.e. look for "program" keyword (with possibly some leading spaces) … … 168 161 # 169 162 echo 170 echo $listlib >> create_make_gcm.log163 echo $listlib >> $logfile 171 164 echo 172 165 echo "#=======================================================================" … … 185 178 echo "# Compilation des membres de la bibliotheque lib"$diri".a" 186 179 echo 187 for trufile in $listlib 188 do 189 # if [ -f $fili.F90 ] ; then 190 # trufile=$fili.F90 191 # else 192 # trufile=$fili.F 193 # fi 180 for trufile in $listlib ; do 194 181 fili=`echo $trufile | awk -F/ ' { print $NF } ' | cut -d. -f1` 195 182 F90=0 ; egrep -i '^ *use ' $trufile > /dev/null 2>&1 && F90=1 … … 208 195 ########################################################################## 209 196 210 for stri in ` ( sed -e '/^[cC\!]/d' $trufile | sed -n "/\#include/s/\#include//p" | sed 's/\"//g' ; sed -e '/^[cC\!]/d' $trufile | egrep -i '^ *use ' | sed -e 's/,/ /' | awk ' { print $2 } ' ) ` 211 do 212 echo $trufile $fili $stri >> create_make_gcm.log 197 for stri in ` ( sed -e '/^[cC\!]/d' $trufile | sed -e "/\#include /s/\#include /XXnclude /" -e "/include /s/include /XXnclude /" -e "/INCLUDE /s/INCLUDE /XXnclude /" | sed -n "/XXnclude /s/XXnclude//p" | sed 's/\"//g' | sort | uniq ; sed -e '/^[cC\!]/d' $trufile | egrep -i '^ *use ' | sed -e 's/,/ /' | awk ' { print $2 } ' | sort | uniq ) ` ; do 198 echo $trufile $fili $stri >> $logfile 213 199 strj=`echo $stri | tr [A-Z] [a-z]` 214 200 str2="" 215 for dirinc in filtrez bibio dyn3d_common grid dyn3d phy dev$diri $diri/*/ ; do201 for dirinc in filtrez bibio dyn3d_common grid dyn3d phy* $diri $diri/*/ ; do 216 202 # Recherche dans l'ordre hierarchique inverse car seule la derniere 217 203 # ligne est conservee … … 223 209 libstr=$dirinc 224 210 fi 211 echo dirinc $dirinc >> $logfile 225 212 if [ -f $dirinc/$stri ] ; then 226 213 str2='$(LIBF)/'$dirstr/$stri … … 234 221 str2='$(LIBO)/lib'$strlib'.a('$stri'.o)' 235 222 fi 223 echo stri $stri >> $logfile 224 echo str2 $str2 >> $logfile 236 225 done 226 echo dernier str2 $str2 >> $logfile 237 227 if [ "$str2" = "" ] ; then 238 echo Warn: Include $diri $trufile $fili $stri pas trouve >> $ gcm/create_make_gcm.log228 echo Warn: Include $diri $trufile $fili $stri pas trouve >> $logfile 239 229 elif [ "$str2" = "$str1" ] ; then 240 echo Warn: Include $diri $trufile $fili $stri $str1 trouve 2x >> $ gcm/create_make_gcm.log230 echo Warn: Include $diri $trufile $fili $stri $str1 trouve 2x >> $logfile 241 231 else 242 232 echo $str1 \\
Note: See TracChangeset
for help on using the changeset viewer.