Changeset 2143 for branches/DEV_r1879_FCM/NEMOGCM/TOOLS/maketools
- Timestamp:
- 2010-10-04T14:49:55+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r1879_FCM/NEMOGCM/TOOLS/maketools
- Property svn:keywords set to Id
r2136 r2143 19 19 # :: 20 20 # 21 # $ make netools21 # $ maketools 22 22 # 23 23 # … … 67 67 # 68 68 # 69 # - rblod 2010-06-20T16:11:47Z70 69 # 71 70 # * creation … … 88 87 x_m=""; 89 88 x_t=""; 89 x_c=""; 90 90 x_j=1; 91 while getopts :h ld:n:r:m:j:t: V91 while getopts :hm:n:r:j:t: V 92 92 do 93 93 case $V in 94 94 (h) echo "Usage : "${b_n} \ 95 " [-h] [- l] [-n name] [-m arch] [-j No] [-t tmpdir]";95 " [-h] [-n name] [-m arch] [-j No] [-t tmpdir]"; 96 96 echo " -h : help"; 97 echo " -l : list existing tools"; 98 echo " -n name : tool name"; 99 echo " -m arch : choose machine"; 97 echo " -n name : tool name, [-n help] to list existing tools"; 98 echo " -m arch : choose compiler, [-m help] to list exiting compilers"; 100 99 echo " -j No : number of processes used to compile (0=nocompilation)"; 101 100 echo " -t dir : remporary directory for compilation" … … 104 103 echo "maketools -n NESTING" ; 105 104 echo ""; 106 echo "Defaults : ";105 printf "%s\n" "Available tools :" `ls ${TOOLS_DIR}|grep -v COMPILE | grep -v maketools`; 107 106 echo ""; 107 . ${COMPIL_DIR}/Flist_archfile.sh ; 108 echo ""; 109 echo "Default : previous tool and compiler"; 108 110 exit 0;; 109 111 (n) x_n=${OPTARG};; … … 111 113 (j) x_j=${OPTARG};; 112 114 (t) x_t=${OPTARG};; 113 (l) echo "Available tools :"; ls ${TOOLS_DIR}|grep -v COMPILE | grep -v maketools; exit;;114 115 (:) echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; 115 116 exit 2;; … … 119 120 done 120 121 shift $(($OPTIND-1)); 122 123 #- 124 #- Get the clean option 125 [[ "${#@}" -ne 0 && "${@}" != clean ]] && echo "Invalid option "$@" " && exit 126 [ "${#@}" -ne 0 ] && x_c="--$@" 121 127 122 128 #- … … 130 136 CMP_NAM=${x_m} 131 137 NEMO_TDIR=${x_t:-$NEMO_TDIR} 132 export NEMO_TDIR=${NEMO_TDIR:-$CONFIG_DIR} 138 export NEMO_TDIR=${NEMO_TDIR:-$TOOLS_DIR} 139 140 #- Check if the tool or the compiler exist or list it 141 [ "${NEW_CONF}" == help ] && printf "%s\n" "Available tools :" `ls ${TOOLS_DIR}|grep -v COMPILE | grep -v maketools` && exit 142 [ "${CMP_NAM}" == help ] && . ${COMPIL_DIR}/Flist_archfile.sh && exit 133 143 134 144 #- When used for the first time, choose a compiler --- 135 145 . ${COMPIL_DIR}/Fcheck_archfile.sh arch_tools.fcm ${CMP_NAM} || exit 136 146 147 #- Mak the building directory 137 148 . ${COMPIL_DIR}/Fmake_bld.sh ${TOOLS_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit 138 149 … … 147 158 cd ${NEMO_TDIR}/${NEW_CONF} || cd - 148 159 149 fcm build --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld_tools.cfg || cd -160 fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld_tools.cfg || cd - 150 161 for i in `ls ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe` 151 162 do … … 162 173 ${COMPIL_DIR}/Fclean_var.sh 163 174 164 165 175 exit 0;
Note: See TracChangeset
for help on using the changeset viewer.