Changeset 2071 for LMDZ5/branches/LMDZ5-DOFOCO/create_make_gcm
- Timestamp:
- Jun 23, 2014, 10:35:34 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/LMDZ5-DOFOCO/create_make_gcm
r1714 r2071 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 … … 42 43 echo 'LIBF = $(GCM)/libf' 43 44 if [ "$CRAY" = '0' ] ; then 44 # echo 'LIBO = $(GCM)/libo/$(MACHINE)'45 45 echo 'LIBO = $(LIBOGCM)/$(MACHINE)' 46 46 else 47 47 echo 'LIBO = $(GCM)/libo' 48 48 fi 49 #echo 'LOCAL_DIR=$(GCM)'50 #echo $localdir51 49 echo "LOCAL_DIR=`echo $localdir`" 52 50 echo 'BIBIO = $(LIBF)/bibio' 53 51 echo "FILTRE = filtre" 54 52 echo "PHYS = " 55 echo "DYN = dyn "56 53 echo 'LIBPHY = $(LIBO)/libphy$(PHYS).a' 57 54 echo 'DIRMAIN=dyn$(DIM)d$(FLAG_PARA)' … … 61 58 echo 62 59 echo '# Les differentes librairies pour l"edition des liens:' 63 echo 64 echo 'dyn3d = $(LIBO)/libdyn3d.a $(LIBO)/lib$(FILTRE).a' 65 echo 'dyn3dpar = $(LIBO)/libdyn3dpar.a $(LIBO)/lib$(FILTRE).a' 66 echo 'dyn2d = $(LIBO)/libdyn2d.a' 67 echo 'dyn1d = $(LIBO)/libdyn1d.a' 68 echo 'L_DYN = -ldyn$(DIM)d$(FLAG_PARA)' 60 echo 'L_DYN = -ldyn$(DIM)d$(FLAG_PARA) -ldyn3d_common' 69 61 echo 'L_FILTRE = -l$(FILTRE)' 70 62 echo 'L_PHY = -lphy$(PHYS) ' … … 93 85 echo 94 86 echo "PROG = code" 87 echo 'DYN = dyn$(DIM)d' 95 88 echo 96 89 #echo 'main : chimie $(DYN) bibio phys $(OPTION_DEP) ' … … 99 92 echo ' cd $(LOCAL_DIR); \' 100 93 echo ' $(COMPILE90) $(LIBF)/$(DIRMAIN)/$(SOURCE) -o $(PROG).o ; \' 101 echo ' $(LINK) $(PROG).o -L$(LIBO) $(L_DYN) $(L_ADJNT) $(L_COSP) $(L_PHY) $(L_DYN) $(L_BIBIO) $(L_DYN) $(L_FILTRE) $(OPLINK) $(OPTION_LINK) -o $(LOCAL_DIR)/$(PROG).e ; $(RM) $(PROG).o ' 102 echo 103 echo 'dyn : $(LIBO)/libdyn$(DIM)d$(FLAG_PARA).a $(FILTRE)$(DIM)d' 94 echo ' $(LINK) $(PROG).o -L$(LIBO) $(L_DYN) $(L_ADJNT) $(L_COSP) $(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 ' 104 95 echo 105 96 echo 'phys : $(LIBPHY)' 97 echo 'dyn3d : $(LIBO)/libdyn$(DIM)d$(FLAG_PARA).a $(LIBO)/lib$(FILTRE).a $(LIBO)/libdyn3d_common.a' 98 echo 'dyn2d : $(LIBO)/libdyn2d.a' 99 echo 'dyn1d :' 100 echo 106 101 echo 107 102 #echo 'chimie : $(LIBO)/libchimie.a' … … 143 138 done 144 139 echo 145 echo $listlib >> create_makeg_gcm.log140 echo $listlib >> $logfile 146 141 echo 147 142 echo "#==================================================================" … … 176 171 ########################################################################## 177 172 178 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 } ') ` ; do179 echo $trufile $fili $stri >> create_make_gcm.log173 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 174 echo $trufile $fili $stri >> $logfile 180 175 strj=`echo $stri | tr [A-Z] [a-z]` 181 176 str2="" 182 for dirinc in filtrez bibio grid dyn3d$diri $diri/*/ ; do177 for dirinc in filtrez bibio dyn3d_common grid dyn3d phydev $diri $diri/*/ ; do 183 178 # Recherche dans l'ordre hierarchique inverse car seule la derniere 184 179 # ligne est conservee 180 if [ $dirinc = phydev ] ; then 181 dirstr='$(PHYS)' 182 libstr='phy$(PHYS)' 183 else 184 dirstr=$dirinc 185 libstr=$dirinc 186 fi 187 echo dirinc $dirinc >> $logfile 185 188 if [ -f $dirinc/$stri ] ; then 186 str2='$(LIBF)/'$dir inc/$stri189 str2='$(LIBF)/'$dirstr/$stri 187 190 elif [ -f $dirinc/$strj ] ; then 188 str2='$(LIBF)/'$dir inc/$stri191 str2='$(LIBF)/'$dirstr/$stri 189 192 elif [ -f $dirinc/$strj.F90 ] || [ -f $dirinc/$strj.F ] ; then 190 strlib=`echo $ dirinc| awk -F/ ' { print $1 } '`193 strlib=`echo $libstr | awk -F/ ' { print $1 } '` 191 194 str2='$(LIBO)/lib'$strlib'.a('$strj'.o)' 195 elif [ -f $dirinc/$stri.F90 ] || [ -f $dirinc/$stri.F ] ; then 196 strlib=`echo $libstr | awk -F/ ' { print $1 } '` 197 str2='$(LIBO)/lib'$strlib'.a('$stri'.o)' 192 198 fi 199 echo stri $stri >> $logfile 200 echo str2 $str2 >> $logfile 193 201 done 202 echo dernier str2 $str2 >> $logfile 194 203 if [ "$str2" = "" ] ; then 195 echo Warn: Include $diri $trufile $fili $stri pas trouve >> $ gcm/create_make_gcm.log204 echo Warn: Include $diri $trufile $fili $stri pas trouve >> $logfile 196 205 elif [ "$str2" = "$str1" ] ; then 197 echo Warn: Include $diri $trufile $fili $stri $str1 trouve 2x >> $ gcm/create_make_gcm.log206 echo Warn: Include $diri $trufile $fili $stri $str1 trouve 2x >> $logfile 198 207 else 199 208 echo $str1 \\
Note: See TracChangeset
for help on using the changeset viewer.