Index: branches/DEV_r1879_FCM/NEMOGCM/CONFIG/makenemo
===================================================================
--- branches/DEV_r1879_FCM/NEMOGCM/CONFIG/makenemo	(revision 2157)
+++ branches/DEV_r1879_FCM/NEMOGCM/CONFIG/makenemo	(revision 2158)
@@ -169,5 +169,5 @@
 #- Choose a default configuration if needed ---
 #- ORCA2_LIM or last one used ---
-. ${COMPIL_DIR}/Fcheck_config.sh ${NEW_CONF} || exit 
+. ${COMPIL_DIR}/Fcheck_config.sh cfg.txt ${NEW_CONF} || exit 
 
 if [ ${#NEW_CONF} -eq 0 ] ; then
@@ -223,14 +223,14 @@
 
 if [ "${NBR_PRC}" -gt 0 ]; then
-cd ${NEMO_TDIR}/${NEW_CONF} || cd -
-
-#if AGRIF we do a first preprocessing
-if [ ${#x_c} -eq 0 ]; then
-[ "$AGRIFUSE" == 1 ] && fcm build --ignore-lock -s 2 ${COMPIL_DIR}/bld.cfg 
-[ "$AGRIFUSE" == 1 ] && rm -rf  ${NEMO_TDIR}/${NEW_CONF}/BLD/*
-fi
-fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld.cfg || cd -
-[ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe ] && ln -sf ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe  ${CONFIG_DIR}/${NEW_CONF}/EXP00/opa
-[ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/server.exe ] && ln -sf ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/server.exe  ${CONFIG_DIR}/${NEW_CONF}/EXP00/server.exe
+   cd ${NEMO_TDIR}/${NEW_CONF} || cd -
+
+   #if AGRIF we do a first preprocessing
+   if [ ${#x_c} -eq 0 ]; then
+      [ "$AGRIFUSE" == 1 ] && fcm build --ignore-lock -s 2 ${COMPIL_DIR}/bld.cfg 
+      [ "$AGRIFUSE" == 1 ] && rm -rf  ${NEMO_TDIR}/${NEW_CONF}/BLD/*
+   fi
+   fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld.cfg || cd -
+   [ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe ] && ln -sf ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe  ${CONFIG_DIR}/${NEW_CONF}/EXP00/opa
+   [ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/server.exe ] && ln -sf ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/server.exe  ${CONFIG_DIR}/${NEW_CONF}/EXP00/server.exe
 fi
 
Index: branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fcheck_config.sh
===================================================================
--- branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fcheck_config.sh	(revision 2157)
+++ branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fcheck_config.sh	(revision 2158)
@@ -26,5 +26,5 @@
 # ::
 #
-#  $ Fcheck_config.sh
+#  $ Fcheck_config.sh FILENAME CONFNAME
 #
 #
@@ -37,5 +37,5 @@
 # - Two cases
 # - One is explicitely set
-# - Nothing set, use the previous in use (default ORA2_LIM)
+# - Nothing set, use the previous in use 
 #
 # EXAMPLES
@@ -65,6 +65,6 @@
 
 declare -a ZTAB
-if [ ${#1} -eq 0 ]; then
-   tail -1  ${COMPIL_DIR}/cfg.txt	> ${COMPIL_DIR}/cfg.tmp
+if [ ${#2} -eq 0 ]; then
+   tail -1  ${COMPIL_DIR}/$1	> ${COMPIL_DIR}/cfg.tmp
    read -a ZTAB < ${COMPIL_DIR}/cfg.tmp
    NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} )
@@ -76,8 +76,10 @@
    echo "Using defaut configuration : ${NEW_CONF}"
 fi
-cat ${COMPIL_DIR}/cfg.txt | grep "${NEW_CONF} " > ${COMPIL_DIR}/cfg.tmp
-read -a ZTAB < ${COMPIL_DIR}/cfg.tmp
-NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} )
-\rm ${COMPIL_DIR}/cfg.tmp
+if [ "$1" == cfg.txt ]; then
+   cat ${COMPIL_DIR}/$1 | grep "${NEW_CONF} " > ${COMPIL_DIR}/cfg.tmp
+   read -a ZTAB < ${COMPIL_DIR}/cfg.tmp
+   NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} )
+   \rm ${COMPIL_DIR}/cfg.tmp
+fi
 
 unset -v ZTAB
Index: branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/tools.txt
===================================================================
--- branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/tools.txt	(revision 2158)
+++ branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/tools.txt	(revision 2158)
@@ -0,0 +1,1 @@
+REBUILD 
Index: branches/DEV_r1879_FCM/NEMOGCM/TOOLS/maketools
===================================================================
--- branches/DEV_r1879_FCM/NEMOGCM/TOOLS/maketools	(revision 2157)
+++ branches/DEV_r1879_FCM/NEMOGCM/TOOLS/maketools	(revision 2158)
@@ -145,5 +145,12 @@
 . ${COMPIL_DIR}/Fcheck_archfile.sh arch_tools.fcm ${CMP_NAM} || exit
 
-#- Mak the building directory
+#- Choose a default tool if needed ---
+#- REBUILD or last one used ---
+. ${COMPIL_DIR}/Fcheck_config.sh tools.txt ${NEW_CONF} || exit
+
+#- Save new configuration ---
+echo "${NEW_CONF} "  > ${COMPIL_DIR}/tools.txt
+
+#- Make the building directory
 . ${COMPIL_DIR}/Fmake_bld.sh ${TOOLS_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit
 
@@ -159,10 +166,11 @@
 
 fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld_tools.cfg || cd -
+if [ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe ]; then
 for i in `ls ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe`
    do
-   ln -sf ${i}  ${TOOLS_DIR}/${NEW_CONF}/.
+      ln -sf ${i}  ${TOOLS_DIR}/${NEW_CONF}/.
    done
 fi
-
+fi
 #-
 #- Come back to original directory ---
