New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 7421 for branches/2016/dev_merge_2016/NEMOGCM/TOOLS/COMPILE/Fcheck_archfile.sh – NEMO

Ignore:
Timestamp:
2016-12-01T18:10:41+01:00 (8 years ago)
Author:
flavoni
Message:

#1811 merge dev_CNRS_MERATOR_2016 with dev_merge_2016 branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_merge_2016/NEMOGCM/TOOLS/COMPILE/Fcheck_archfile.sh

    r4162 r7421  
    166166 
    167167#- do we need xios library? 
    168 if [ "$2" != "nocpp" ]  
     168#- 2 cases:  
     169#- in CONFIG directory looking for key_iomput 
     170if [ "$1" == "arch_nemo.fcm" ] 
    169171then 
    170     use_iom=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_iomput ) 
     172    if [ "$2" != "nocpp" ]  
     173    then 
     174        use_iom=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_iomput ) 
     175    else 
     176        use_iom=0 
     177    fi 
     178    have_lxios=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-lxios" ) 
     179    if [[ ( $use_iom -eq 0 ) && ( $have_lxios -ge 1 ) ]] 
     180    then  
     181        sed -e "s/-lxios//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$ 
     182        mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1 
     183    fi 
     184#- in TOOLS directory looking for USE xios 
    171185else 
    172     use_iom=0 
    173 fi 
    174 have_lxios=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-lxios" ) 
    175 if [[ ( $use_iom -eq 0 ) && ( $have_lxios -ge 1 ) ]] 
    176 then  
    177     sed -e "s/-lxios//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$ 
    178     mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1 
     186    use_iom=$( egrep --exclude-dir=.svn -r USE ${NEW_CONF}/src/* | grep -c xios ) 
     187    have_lxios=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-lxios" ) 
     188    if [[ ( $use_iom -eq 0 ) || ( $have_lxios != 1 ) ]] 
     189    then  
     190        sed -e "s/-lxios//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$ 
     191        mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1 
     192    fi 
    179193fi 
    180194 
Note: See TracChangeset for help on using the changeset viewer.