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 14947 – NEMO

Changeset 14947


Ignore:
Timestamp:
2021-06-04T16:09:44+02:00 (3 years ago)
Author:
gsamson
Message:

modify Fmake_WORK.sh script and call in makenemo to correctly handle '-e' option; ticket #2684

Location:
utils/build
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • utils/build/makenemo

    r14198 r14947  
    277277 
    278278export NEMO_TDIR=${x_t:-$CONFIG_DIR} 
     279export $NEM_SUBDIR $NEW_CONF 
    279280 
    280281## Save new configuration with sub-components set in work_cfgs.txt 
     
    300301#- Clean links and librairies --- 
    301302#- Creating the good links, at first on OCE --- 
    302 . ${COMPIL_DIR}/Fmake_WORK.sh ${x_e} ${NEW_CONF} ${NEM_SUBDIR} || exit 3 
     303. ${COMPIL_DIR}/Fmake_WORK.sh ${x_e[@]} || exit 3 
    303304 
    304305. ${COMPIL_DIR}/Fmake_bld.sh ${CONFIG_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit 3 
  • utils/build/mk/Fmake_WORK.sh

    r14228 r14947  
    6464# 
    6565#- 
    66 declare ZSRC=$1 ; shift  
    67 declare ZCONF=$1 ; shift 
    68 ZTAB=( $@ ) 
     66declare ZSRC=${@} 
     67ZCONF=${NEW_CONF} 
     68ZTAB=${NEM_SUBDIR[@]} 
    6969declare i=0 ; declare NDIR=${#ZTAB[@]} 
    7070 
     
    7474[   -d ${ZCONF}/WORK   ] || \mkdir ${ZCONF}/WORK 
    7575 
    76 if [ "${ZSRC}" != 'none' ] ; then  
    77  
    78    if [ -d ${ZSRC} ] ; then  
    79       ln -sf ${ZSRC}/*.[Ffh]90 ${ZCONF}/MY_SRC/.  
    80       echo 'MY_SRC content is linked to '${ZSRC} 
    81    else 
    82       echo 'External directory for MY_SRC does not exist. Using default.' 
    83    fi 
    84  
    85 else  
    86    echo 'MY_SRC directory is : '${ZCONF}'/MY_SRC' 
    87 fi 
    88  
    89 #\rm -f ../${1}/WORK/* 
    90  
    9176for comp in ${ZTAB[*]}; do 
    9277   find ${NEMO_DIR}/$comp -name *.[Ffh]90 -exec ln -sf {} ${ZCONF}/WORK \; 
    9378done 
    9479 
    95 for i in `(find ${ZCONF}/MY_SRC -name *.[Ffh]90 2>/dev/null ) `; do 
    96    [ -f $i ] &&  ln -sf $PWD/${i} ${ZCONF}/WORK/. 
     80for ZDIR in ${ZSRC[@]}; do 
     81    if [ -d ${ZDIR} ] ; then 
     82      ln -sf ${ZDIR}/*.[Ffh]90 ${ZCONF}/WORK/.  
     83      echo ${ZDIR}' content is linked to '${ZCONF}/WORK 
     84    elif [ -d ${ZCONF}/${ZDIR} ] ; then 
     85      ln -rsf ${ZCONF}/${ZDIR}/*.[Ffh]90 ${ZCONF}/WORK/.  
     86      echo ${ZDIR}' content is linked to '${ZCONF}/WORK 
     87    else 
     88      ln -rsf ${ZCONF}/MY_SRC/*.[Ffh]90 ${ZCONF}/WORK/.  
     89      echo 'External directory for MY_SRC does not exist. Using default.' 
     90      echo 'MY_SRC content is linked to '${ZCONF}/WORK 
     91    fi 
    9792done 
    9893 
Note: See TracChangeset for help on using the changeset viewer.