Changeset 9651 for utils/build/makenemo
- Timestamp:
- 2018-05-28T08:47:14+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
utils/build/makenemo
r9623 r9651 41 41 # - CMP_NAM : compiler name 42 42 # - NBR_PRC : number of processes used to compile 43 # - USP_CONF : unsupported (external) configuration to build the new one from43 # - RMT_CONF : unsupported (external) configuration to build the new one from 44 44 # - NEM_SUBDIR : NEMO subdirectory used (specified) 45 45 # … … 63 63 # :: 64 64 # 65 # $ ./makenemo -m ifort_osx - j3 -n ORCA2_ LIM3_PISCES65 # $ ./makenemo -m ifort_osx - j3 -n ORCA2_SI3_PISCES 66 66 # 67 67 # … … 84 84 85 85 #- 86 #- Initialization of the options --- 87 x_d=""; 88 x_h=""; 89 x_n=""; 90 x_r=""; 91 x_u=""; 92 x_a=""; 93 x_m=""; 94 x_t=""; 95 x_c=""; 96 x_j=1; 97 x_e="none"; 98 x_s=src; 99 x_v=1; 100 101 #- Local variables --- 86 ##- Initialization of the options --- 87 x_d=''; x_h=''; x_n=''; x_r=''; 88 x_u=''; x_a=''; x_m=''; x_t=''; 89 x_c=''; 90 x_j='1'; x_e='none'; x_s='src'; x_v='1' 91 92 ##- Local variables --- 102 93 b_n=$(basename ${0}) 103 OPTIND= 194 OPTIND='1' 104 95 MAIN_DIR=$(cd $(dirname "$0"); pwd) 105 MAIN_DIR=${MAIN_DIR%/ SETTE*}96 MAIN_DIR=${MAIN_DIR%/sette*} 106 97 MAIN_DIR=${MAIN_DIR%/tools*} 107 98 MAIN_DIR=${MAIN_DIR%/cfgs*} … … 112 103 export COMPIL_DIR=${MAIN_DIR}/mk 113 104 export NEMO_DIR=${MAIN_DIR}/${x_s} 114 export AGRIFUSE=10 115 declare -a TAB 116 declare -a REMOTE_CTL 117 declare -a LOCAL_REF 118 list_key=0 119 chk_key=1 105 export AGRIFUSE='10' 106 list_key='0'; chk_key='1' 107 list_add_key=''; list_del_key=''; 108 conf_file='ref_cfgs.txt' 120 109 #- 121 110 #- FCM and functions location --- … … 124 113 #- 125 114 #- Choice of the options --- 126 while getopts :hd:n:r:u:a:m:j:e:s:v:t:k: V 127 do 128 case $V in 129 (h) x_h=${OPTARG}; 130 echo "Usage : "${b_n} \ 131 " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-u conf] [-s Path] [-e Path] [-j No] [-v No] [-k 0/1]"; 132 echo " -h : help"; 133 echo " -h institute : specific help for consortium members"; 134 echo " -n name : config name, [-n help] to list existing configurations"; 135 echo " -m arch : choose compiler, [-m help] to list existing compilers"; 136 echo " -d dir : choose NEMO sub-directories"; 137 echo " -r conf : choose reference configuration"; 138 echo " -u conf : choose an unsupported (external) configuration"; 139 echo " -s Path : choose alternative location for NEMO main directory"; 140 echo " -e Path : choose alternative location for MY_SRC directory"; 141 echo " -j No : number of processes used to compile (0=nocompilation)"; 142 echo " -v No : set verbosity level for compilation [0-3]"; 143 echo " -k 0/1 : used cpp keys check (default = 1 -> check activated)"; 144 echo " -t dir : temporary directory for compilation" 145 echo " -a dir : alternative sub-directory for configurations (below CONFIG)" 146 echo ""; 147 echo "Example to install a new configuration MY_CONFIG"; 148 echo "with OCE and ICE "; 149 echo "makenemo -n MY_CONFIG -d \"OCE ICE\""; 150 echo ""; 151 echo "Available configurations :"; cat ${CONFIG_DIR}/cfg.txt; 152 echo ""; 153 echo "Available unsupported (external) configurations :"; 154 if [ -f ${CONFIG_DIR}/uspcfg.txt ] ; then cat ${CONFIG_DIR}/uspcfg.txt; fi; 155 echo ""; 156 echo "Example to install an unsupoorted configuration MY_USP"; 157 echo "makenemo -n MY_USP -u MY_USP" ; 158 echo ""; 159 echo "Example to remove bad configuration "; 160 echo "./makenemo -n MY_CONFIG clean_config"; 161 echo ""; 162 echo "Example to clean "; 163 echo "./makenemo clean"; 164 echo ""; 165 echo "Example to list the available keys of a CONFIG "; 166 echo "./makenemo list_key"; 167 echo ""; 168 echo "Example to add and remove keys"; 169 echo "./makenemo add_key \"key_iomput key_mpp_mpi\" del_key \"key_agrif\" "; 170 echo ""; 171 echo "Example to add and remove keys for a new configuration, and do not compile"; 172 echo "./makenemo -n MY_CONFIG -j0 add_key \"key_iomput key_mpp_mpi\" del_key \"key_agrif\" "; 173 echo ""; 174 . ${COMPIL_DIR}/Flist_archfile.sh ${x_h} ; 175 echo ""; 176 echo "Default : previous configuration and compiler"; 177 exit 0;; 178 (d) x_d=${OPTARG};; 179 (n) x_n=${OPTARG};; 180 (r) x_r=${OPTARG};; 181 (u) x_u=${OPTARG};; 182 (a) x_a=${OPTARG};; 183 (m) x_m=${OPTARG};; 184 (j) x_j=${OPTARG};; 185 (t) x_t=${OPTARG};; 186 (e) x_e=${OPTARG};; 187 (s) x_s=${OPTARG};; 188 (v) x_v=${OPTARG};; 189 (k) chk_key=${OPTARG};; 190 (:) echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; 191 exit 2;; 192 (\?) echo ${b_n}" : -"${OPTARG}" option : not supported" 1>&2; 193 exit 2;; 194 esac 115 while getopts :hd:n:r:u:a:m:j:e:s:v:t:k: option; do 116 117 case $option in 118 ('h') cat <<EOF 119 Usage: 120 ------ 121 ./makenemo -[adru] ... -m ... [-h] [-[dejntv] ...] [{list_key,clean,clean_config}] [{add_key,del_key} ...] 122 123 The previous build is reused by default if no given options 124 125 Mandatory: 'all' to list available arguments by option 126 -a Demonstration case (./tests) 127 -m Computing architecture (./arch) 128 -r Reference configuration (./cfgs) 129 -u Scripted remote configuration (./tests/rmt_cfgs.txt) 130 131 Optional: 132 -d Set of new sub-components (space separated list from ./src directory) 133 -e Path for alternative patch location (default: 'MY_SRC' in configuration folder) 134 -j Number of processes to compile (0: no build) 135 -n Name for new configuration 136 -s Path for alternative source location (default: 'src' root directory) 137 -t Path for alternative build location (default: 'BLD' in configuration folder) 138 -v Level of verbosity ([0-3]) 139 140 Examples: 141 ¤ Configuration build 142 Creation : ./makenemo -[adru] ... -m ... [...] 143 Duplication : ./makenemo -r ... -n ... [...] 144 ¤ Configuration management 145 List CPP keys : ./makenemo [...] list_key 146 Add-Remove keys: ./makenemo [...] add_key '...' del_key '...' 147 Fresh start : ./makenemo [...] clean 148 Erasure : ./makenemo [...] clean_config 149 150 EOF 151 exit 0 ;; 152 ('d') x_d=${OPTARG};; ('n') x_n=${OPTARG};; ('r') x_r=${OPTARG};; ('u') x_u=${OPTARG};; 153 ('a') x_a=${OPTARG};; ('m') x_m=${OPTARG};; ('j') x_j=${OPTARG};; ('t') x_t=${OPTARG};; 154 ('e') x_e=${OPTARG};; ('s') x_s=${OPTARG};; ('v') x_v=${OPTARG} ;; 155 ('k') chk_key=${OPTARG} ;; 156 (':') echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; exit 2 ;; 157 ('?') echo ${b_n}" : -"${OPTARG}" option : not supported" 1>&2; exit 2 ;; 158 esac 159 195 160 done 161 196 162 shift $(($OPTIND-1)); 197 163 198 while [ ${#1} -gt 0 ] # Get clean, clean_config options 199 do 200 case "$1" in 201 clean) 202 x_c="--$1" 203 ;; 204 clean_config) 205 . ${COMPIL_DIR}/Fclean_config.sh 206 exit 207 ;; 208 add_key) 209 # Checking if argument has anything other than whitespace 210 [[ ! "$2" =~ ^\ +$ ]] && { list_add_key=$2; export ${list_add_key}; } 211 shift 212 ;; 213 del_key) 214 # Checking if argument has anything other than whitespace 215 [[ ! "$2" =~ ^\ +$ ]] && { list_del_key=$2; export ${list_del_key}; } 216 shift 217 ;; 218 list_key) 219 list_key=1 220 ;; 221 *) 222 echo " \"$1\" BAD OPTION" 223 exit 2 224 ;; 225 226 esac 227 shift 164 ## Get clean, clean_config options 165 while [ ${#1} -gt 0 ]; do 166 167 case "$1" in 168 'clean' ) x_c="--$1" ;; 169 'clean_config') . ${COMPIL_DIR}/Fclean_config.sh; exit ;; 170 ## Checking if argument has anything other than whitespace 171 'add_key' ) [[ ! "$2" =~ ^\ +$ ]] && list_add_key=$2; shift;; 172 'del_key' ) [[ ! "$2" =~ ^\ +$ ]] && list_del_key=$2; shift;; 173 'list_key' ) list_key='1' ;; 174 '*' ) echo " \"$1\" BAD OPTION"; exit 2 ;; 175 esac 176 177 shift 228 178 done 229 179 230 180 231 #-232 #- Go to NEMOGCM/cfgs directory ---233 cd ${CONFIG_DIR}234 235 #-236 #- Initialisation from input ---237 export ALT_DIR=${x_a}238 if [ ! -z $ALT_DIR ]; then239 if [ -d ${CONFIG_DIR}/${ALT_DIR} ]; then240 export CONFIG_DIR=${CONFIG_DIR}/${ALT_DIR}241 #-242 #- Go to named subdirectory of the NEMOGCM/cfgs directory ---243 cd ${CONFIG_DIR}244 fi245 fi246 181 export NEW_CONF=${x_n} 247 182 NBR_PRC=${x_j} … … 249 184 NEM_SUBDIR=${x_d} 250 185 REF_CONF=${x_r} 251 USP_CONF=${x_u}252 NEMO_TDIR=${x_t}253 export NEMO_TDIR=${NEMO_TDIR:-$CONFIG_DIR}186 DEMO_CONF=${x_a} 187 RMT_CONF=${x_u} 188 TML_CONF=${REF_CONF} 254 189 export NEMO_DIR=${MAIN_DIR}/${x_s} 255 190 256 #- Check if the tool or the compiler exist or list it 257 if [ "${NEW_CONF}" == help ] ; then 258 echo "Available configurations :" 259 cat ${CONFIG_DIR}/cfg.txt 260 echo 261 echo "Available unsupported (external) configurations :" 262 if [ -f ${CONFIG_DIR}/uspcfg.txt ] ; then cat ${CONFIG_DIR}/uspcfg.txt; fi; 263 exit 264 fi 265 [ "${CMP_NAM}" == help ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit 266 267 #- 268 #- Choose a default configuration if needed --- 269 #- ORCA2_LIM3_PISCES or last one used --- 270 . ${COMPIL_DIR}/Fcheck_config.sh cfg.txt ${NEW_CONF} || exit 271 272 if [ ${#NEW_CONF} -eq 0 ] ; then 273 if [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#REF_CONF} -eq 0 ] && [ ${#USP_CONF} -eq 0 ] ; then 274 echo "You are installing a new default (ORCA2_LIM3_PISCES) configuration" 275 ind=0 276 . ${COMPIL_DIR}/Fread_dir.sh OCE YES 277 . ${COMPIL_DIR}/Fread_dir.sh ICE NO 278 . ${COMPIL_DIR}/Fread_dir.sh TOP NO 279 . ${COMPIL_DIR}/Fread_dir.sh NST YES 280 . ${COMPIL_DIR}/Fread_dir.sh OFF NO 281 . ${COMPIL_DIR}/Fread_dir.sh SAO NO 282 . ${COMPIL_DIR}/Fread_dir.sh SAS NO 283 REF_CONF=ORCA2_LIM3_PISCES 284 elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ] && [ ${#USP_CONF} -eq 0 ] ; then 285 echo "You are installing a new configuration based on ORCA2_LIM3_PISCES" 286 TAB=( ${NEM_SUBDIR} ) 287 REF_CONF=ORCA2_LIM3_PISCES 288 elif [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#REF_CONF} -gt 0 ]; then 289 echo "You are installing a new configuration based on ${REF_CONF}" 290 . ${COMPIL_DIR}/Fcopy_dir.sh ${REF_CONF} 291 elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -gt 0 ]; then 292 echo "You are installing an hydrid configuration based on ${REF_CONF} with components ${NEM_SUBDIR}" 293 . ${COMPIL_DIR}/Fcopy_dir.sh ${REF_CONF} 294 TAB=( ${NEM_SUBDIR} ) 295 elif [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#USP_CONF} -gt 0 ]; then 296 echo "You are installing a new configuration based on the unsupported (external) ${USP_CONF}" 297 . ${COMPIL_DIR}/Fcopy_extdir.sh ${USP_CONF} 298 #echo "TTT " ${TAB} 299 #echo "RRR " ${REMOTE_CTL} 300 #echo "LLL " ${LOCAL_REF} 301 fi 302 NEW_CONF=${x_n} 303 304 if [ ${#USP_CONF} -gt 0 ]; then 305 . ${COMPIL_DIR}/Fmake_extconfig.sh ${NEW_CONF} ${LOCAL_REF} 306 . ${COMPIL_DIR}/Ffetch_extdir.sh ${NEW_CONF} ${REMOTE_CTL} 307 else 308 . ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF} 309 fi 191 [ "${CMP_NAM}" == 'all' ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit 192 193 194 ## No ref. cfg, demo case, nor remote cfg selected 195 if [[ -z "${REF_CONF}" && -z "${DEMO_CONF}" && -z "${RMT_CONF}" ]]; then 196 conf_file='work_cfgs.txt' 197 198 ## Reuse last configuration compiled if any (existing 'work_cfgs.txt') 199 if [[ $( find ./cfgs ./tests -name work_cfgs.txt ) ]]; then 200 CONFIG_DIR=${MAIN_DIR}/$( ls -rt */work_cfgs.txt | awk -F/ 'END{ print $1}' ) 201 TML_CONF=$( tail -1 ${CONFIG_DIR}/${conf_file} | awk '{ print $1 }' ) 202 else 203 ## No ${REF_CONF}, ${DEMO_CONF}, ${RMT_CONF} nor ${NEM_SUBDIR} and 1st compilation => exit 204 echo -e "\033[0;33m\nNo previous compilation found!" 205 echo -e "\033[0;31m\nAt least a reference configuration ('-r'), a demonstration case ('-a'), " 206 echo -e "a remote configuration ('-u') or a set of NEMO sub-components ('-d') " 207 echo -e "has to be choose!!!\033[0m" 208 ${COMPIL_DIR}/Flist_cfgs.sh 209 exit 2 210 fi 211 212 ## At least one config has been requested 310 213 else 311 sed -e "/${NEW_CONF} /d" ${CONFIG_DIR}/cfg.txt > ${COMPIL_DIR}/cfg.tmp 312 \mv ${COMPIL_DIR}/cfg.tmp ${CONFIG_DIR}/cfg.txt 313 fi 314 315 #- 316 #- Save new configuration and directories names --- 317 echo ${NEW_CONF} ${TAB[*]} >> ${CONFIG_DIR}/cfg.txt 318 319 #- 214 215 ## Argument 'all': list all available configurations 216 if [[ "${REF_CONF}" == 'all' || "${DEMO_CONF}" == 'all' || "${RMT_CONF}" == 'all' ]]; then 217 ${COMPIL_DIR}/Flist_cfgs.sh 218 exit 2 219 elif [[ -n "${REF_CONF}" && -n "${DEMO_CONF}" ]]; then 220 echo -e "\033[0;31m\nYou have to choose whether you work with:" 221 echo -e " - Supported reference configurations in ./cfgs ('-r') or" 222 echo -e " - Unsupported demonstration cases in ./tests ('-a')\033[0m\n" 223 exit 2 224 fi 225 226 ## Remote cfg 227 if [ -n "${RMT_CONF}" ]; then 228 conf_file='rmt_cfgs.txt' ; CONFIG_DIR=${MAIN_DIR}/tests; 229 230 ## Little tricky this one 231 for word in $( grep ${RMT_CONF} ${CONFIG_DIR}/${conf_file} ); do 232 words[${#words[@]}]=$word 233 done 234 235 TML_CONF=${words[2]}; NEM_SUBDIR=${words[4]}; URL=${words[6]} 236 237 ## Demo case 238 elif [ -n "${DEMO_CONF}" ]; then 239 conf_file='demo_cfgs.txt'; CONFIG_DIR=${MAIN_DIR}/tests; TML_CONF=${DEMO_CONF} 240 fi 241 242 fi 243 244 ## Test if ref. cfg or demo case does exist 245 if [[ ! $( grep "${TML_CONF} " ${CONFIG_DIR}/*_cfgs.txt ) ]]; then 246 echo -e "\033[0;31m\nThe reference configuration ('-r'), demonstration case ('-a') or " 247 echo -e "remote configuration ('-u') selected is not available!!!" 248 echo -e "Check if you use the good option and the available items in txt files\033[0m" 249 ${COMPIL_DIR}/Flist_cfgs.sh 250 exit 2 251 252 ## Update sub-comps if needed 253 elif [ -z "${NEM_SUBDIR}" ]; then 254 ## First check working cfgs file 255 256 if [ -f ${CONFIG_DIR}/work_cfgs.txt ]; then 257 NEM_SUBDIR=$( grep "${TML_CONF} " ${CONFIG_DIR}/work_cfgs.txt | awk '{$1 = ""; print $0}' ) 258 fi 259 260 ## Then versioned cfg files 261 if [ -z "${NEM_SUBDIR}" ]; then 262 NEM_SUBDIR=$( grep "${TML_CONF} " ${CONFIG_DIR}/${conf_file} | awk '{$1 = ""; print $0}' ) 263 fi 264 265 fi 266 267 [ -z "${NEW_CONF}" ] && NEW_CONF=${TML_CONF} 268 export NEMO_TDIR=${x_t:-$CONFIG_DIR} 269 270 ## Save new configuration with sub-components set in work_cfgs.txt 271 [ -f ${CONFIG_DIR}/work_cfgs.txt ] && sed -i "/${NEW_CONF} /d" ${CONFIG_DIR}/work_cfgs.txt 272 echo ${NEW_CONF} "${NEM_SUBDIR}" \ 273 >> ${CONFIG_DIR}/work_cfgs.txt 274 275 cd ${CONFIG_DIR} 276 277 printf "\nYou are installing a new configuration %s from %s " ${NEW_CONF} ${TML_CONF} 278 printf "with sub-components: %s\n" "${NEM_SUBDIR}" 279 280 ## Build a copy of a tmp cfg 281 [ ! -d ${NEW_CONF} ] && ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${TML_CONF} 282 283 ## Get online script file for remote cfg 284 [ -n "${RMT_CONF}" ] && ${COMPIL_DIR}/Ffetch_extdir.sh ${NEW_CONF} $URL 285 320 286 #- Create the WORK --- 321 287 #- Clean links and librairies --- 322 288 #- Creating the good links, at first on OCE --- 323 . ${COMPIL_DIR}/Fmake_WORK.sh ${x_e} ${NEW_CONF} ${ TAB[*]} || exit 3324 325 . ${COMPIL_DIR}/Fmake_bld.sh ${CONFIG_DIR} ${NEW_CONF} 289 . ${COMPIL_DIR}/Fmake_WORK.sh ${x_e} ${NEW_CONF} ${NEM_SUBDIR} || exit 3 290 291 . ${COMPIL_DIR}/Fmake_bld.sh ${CONFIG_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit 3 326 292 327 293 # build the complete list of the cpp keys of this configuration 328 if [ $ chk_key-eq 1 ] ; then329 for i in $( grep "^ *#.* key_" ${NEW_CONF}/WORK/* ) 330 331 echo $i | grep key_ | sed -e "s/=.*//"332 done | sort -d | uniq > ${COMPIL_DIR}/full_key_list.txt 333 if [ $list_key -eq 1 ]; then 334 cat ${COMPIL_DIR}/full_key_list.txt 335 exit 0336 fi 294 if [ ${chk_key} -eq 1 ] ; then 295 296 for i in $( grep "^ *#.* key_" ${NEW_CONF}/WORK/* ); do 297 echo $i | grep key_ | sed -e "s/=.*//" 298 done \ 299 | sort -d | uniq > ${COMPIL_DIR}/full_key_list.txt 300 301 [ ${list_key} -eq 1 ] && cat ${COMPIL_DIR}/full_key_list.txt && exit 0 302 337 303 fi 338 304 … … 343 309 #- check that all keys are really existing... 344 310 if [ $chk_key -eq 1 ] ; then 345 for kk in $( cat ${NEW_CONF}/cpp_${NEW_CONF}.fcm ) 346 do 347 if [ "$( echo $kk | cut -c 1-4 )" == "key_" ]; then 348 kk=${kk/=*/} 349 nb=$( grep -c $kk ${COMPIL_DIR}/full_key_list.txt ) 350 if [ $nb -eq 0 ]; then 351 echo 352 echo "E R R O R : key "$kk" is not found in ${NEW_CONF}/WORK routines..." 353 echo "we stop..." 354 echo 355 exit 1 356 fi 357 fi 358 done 311 312 for kk in $( cat ${NEW_CONF}/cpp_${NEW_CONF}.fcm ); do 313 314 if [ "$( echo $kk | cut -c 1-4 )" == "key_" ]; then 315 kk=${kk/=*/} 316 317 if [ ! $( grep $kk ${COMPIL_DIR}/full_key_list.txt ) ]; then 318 echo 319 echo "E R R O R : key "$kk" is not found in ${NEW_CONF}/WORK routines..." 320 echo "we stop..." 321 echo 322 exit 1 323 fi 324 325 fi 326 327 done 328 359 329 fi 360 330 … … 379 349 380 350 if [ "${NBR_PRC}" -gt 0 ]; then 381 cd ${NEMO_TDIR}/${NEW_CONF} || cd - 382 383 #if AGRIF we do a first preprocessing 384 if [ ${#x_c} -eq 0 ]; then 385 if [ "$AGRIFUSE" == 1 ]; then 386 fcm build --ignore-lock -j 1 ${COMPIL_DIR}/bld_preproagr.cfg ||{ cd - ; exit 1 ;} 387 echo "" 388 echo "---------------------------------" 389 echo "CONV preprocessing successfull !!" 390 echo "---------------------------------" 391 echo "" 392 fi 393 fi 394 fcm build ${x_c} --ignore-lock -v ${x_v} -j ${NBR_PRC} ${COMPIL_DIR}/$USEBLD ||{ cd - ; exit 1 ;} 395 [ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe ] && ln -sf ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe ${CONFIG_DIR}/${NEW_CONF}/EXP00/nemo 396 397 #add remove for clean option 398 if [ ${#x_c} -ne 0 ]; then 399 rm -rf ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES 400 rm -rf ${NEMO_TDIR}/${NEW_CONF}/WORK 401 rm -rf ${NEMO_TDIR}/${NEW_CONF}/BLD 402 rm -rf ${NEMO_TDIR}/${NEW_CONF}/EXP00/nemo 403 rm -f ${COMPIL_DIR}/*history ${COMPIL_DIR}/*fcm ${COMPIL_DIR}/*txt 404 echo "cleaning ${NEW_CONF} WORK, BLD" 405 fi 351 cd ${NEMO_TDIR}/${NEW_CONF} || cd - 352 353 ## if AGRIF we do a first preprocessing 354 if [[ ${#x_c} -eq 0 && "$AGRIFUSE" -eq 1 ]]; then 355 fcm build --ignore-lock -j 1 ${COMPIL_DIR}/bld_preproagr.cfg ||{ cd - ; exit 1 ;} 356 echo '' 357 echo "---------------------------------" 358 echo "CONV preprocessing successfull !!" 359 echo "---------------------------------" 360 echo '' 361 fi 362 363 fcm build ${x_c} --ignore-lock -v ${x_v} -j ${NBR_PRC} ${COMPIL_DIR}/$USEBLD ||{ cd - ; exit 1 ;} 364 365 if [ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe ]; then 366 ln -sf ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe ${CONFIG_DIR}/${NEW_CONF}/EXP00/nemo 367 fi 368 369 ## add remove for clean option 370 if [ ${#x_c} -ne 0 ]; then 371 rm -rf ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES 372 rm -rf ${NEMO_TDIR}/${NEW_CONF}/WORK 373 rm -rf ${NEMO_TDIR}/${NEW_CONF}/BLD 374 rm -rf ${NEMO_TDIR}/${NEW_CONF}/EXP00/nemo 375 rm -f ${COMPIL_DIR}/*history ${COMPIL_DIR}/*fcm ${COMPIL_DIR}/*txt 376 echo "cleaning ${NEW_CONF} WORK, BLD" 377 fi 406 378 407 379 fi … … 413 385 #- Unset variables 414 386 ${COMPIL_DIR}/Fclean_var.sh 415 416
Note: See TracChangeset
for help on using the changeset viewer.