Changeset 3937
- Timestamp:
- 2013-06-24T18:04:26+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/CONFIG/makenemo
r3924 r3937 106 106 export AGRIFUSE=10 107 107 declare -a TAB 108 list_key=0; 108 list_key=0 109 chk_key=1 109 110 #- 110 111 #- FCM and functions location --- … … 113 114 #- 114 115 #- Choice of the options --- 115 while getopts :hd:n:r:m:j:e:s:v:t: V116 while getopts :hd:n:r:m:j:e:s:v:t:k: V 116 117 do 117 118 case $V in 118 119 (h) x_h=${OPTARG}; 119 120 echo "Usage : "${b_n} \ 120 " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-s Path] [-e Path] [-j No] [-v No] ";121 " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-s Path] [-e Path] [-j No] [-v No] [-k 0/1]"; 121 122 echo " -h : help"; 122 123 echo " -h institute : specific help for consortium members"; … … 129 130 echo " -j No : number of processes used to compile (0=nocompilation)"; 130 131 echo " -v No : set verbosity level for compilation [0-3]"; 132 echo " -k 0/1 : used cpp keys check (default = 1 -> check activated)"; 131 133 echo " -t dir : temporary directory for compilation" 132 134 echo ""; … … 165 167 (s) x_s=${OPTARG};; 166 168 (v) x_v=${OPTARG};; 169 (k) chk_key=${OPTARG};; 167 170 (:) echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; 168 171 exit 2;; … … 273 276 274 277 # build the complete list of the cpp keys of this configuration 275 for i in $( grep "^ *#.* key_" ${NEW_CONF}/WORK/* ) 276 do 277 echo $i | grep key_ 278 done | sort -d | uniq > ${COMPIL_DIR}/full_key_list.txt 279 if [ $list_key -eq 1 ]; then 280 cat ${COMPIL_DIR}/full_key_list.txt 281 exit 0 278 if [ $chk_key -eq 1 ] ; then 279 for i in $( grep "^ *#.* key_" ${NEW_CONF}/WORK/* ) 280 do 281 echo $i | grep key_ | sed -e "s/=.*//" 282 done | sort -d | uniq > ${COMPIL_DIR}/full_key_list.txt 283 if [ $list_key -eq 1 ]; then 284 cat ${COMPIL_DIR}/full_key_list.txt 285 exit 0 286 fi 282 287 fi 283 288 … … 292 297 fi 293 298 294 for kk in $( cat ${NEW_CONF}/cpp_${NEW_CONF}.fcm ) 295 do 296 if [ "$( echo $kk | cut -c 1-4 )" == "key_" ]; then 297 nb=$( grep -c $kk ${COMPIL_DIR}/full_key_list.txt ) 298 if [ $nb -eq 0 ]; then 299 echo 300 echo "E R R O R : key "$kk" is not found in ${NEW_CONF}/WORK routines..." 301 echo "we stop..." 302 echo 303 exit 1 299 #- check that all keys are really existing... 300 if [ $chk_key -eq 1 ] ; then 301 for kk in $( cat ${NEW_CONF}/cpp_${NEW_CONF}.fcm ) 302 do 303 if [ "$( echo $kk | cut -c 1-4 )" == "key_" ]; then 304 kk=${kk/=*/} 305 nb=$( grep -c $kk ${COMPIL_DIR}/full_key_list.txt ) 306 if [ $nb -eq 0 ]; then 307 echo 308 echo "E R R O R : key "$kk" is not found in ${NEW_CONF}/WORK routines..." 309 echo "we stop..." 310 echo 311 exit 1 312 fi 304 313 fi 305 fi306 done 314 done 315 fi 307 316 308 317 #- At this stage cpp keys have been updated. we can check the arch file … … 348 357 rm -rf ${NEMO_TDIR}/${NEW_CONF}/BLD 349 358 rm -rf ${NEMO_TDIR}/${NEW_CONF}/EXP00/opa 359 rm -f ${COMPIL_DIR}/*history ${COMPIL_DIR}/*fcm ${COMPIL_DIR}/*txt 350 360 echo "cleaning ${NEW_CONF} WORK, BLD" 351 361 fi
Note: See TracChangeset
for help on using the changeset viewer.