Changeset 10587 for utils/build/makenemo
- Timestamp:
- 2019-01-27T20:54:26+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
utils/build/makenemo
r10289 r10587 121 121 ./makenemo -[aru] CONFIG -m ARCH [-[dehjntv] ...] [{list_key,clean,clean_config}] [{add_key,del_key} ...] 122 122 123 The previous build is reused by default if no mandatory option given124 125 123 Mandatory: 126 - a Academic test case (./tests)127 -m Computing architecture (./arch)128 -r Reference configuration (./cfgs)129 - u Scripted remote configuration (./tests/rmt_cfgs.txt)130 Pass 'all' to any option to list available arguments 124 -m Computing architecture (./arch), FCM file describing the compilation settings 125 and one of the following option (use 'all' arg to list available items) 126 -r Reference configuration (./cfgs), proven with long-term support until the EOL of the release 127 -a Academic test case (./tests), ready to use at the release start without guarantee or support over time 128 -u Scripted remote configuration (see ./tests/rmt_cfgs.txt) 131 129 132 130 Optional: 133 -d Set of new sub-components (space separatedlist from ./src directory)134 -e Path for alter nativepatch location (default: 'MY_SRC' in configuration folder)131 -d New set of sub-components (list from ./src directory) 132 -e Path for alter patch location (default: 'MY_SRC' in configuration folder) 135 133 -h Print this help 136 -j Number of processes to compile (0: no build)134 -j Number of processes to compile (0: dry run with no build) 137 135 -n Name for new configuration 138 -s Path for alter nativesource location (default: 'src' root directory)139 -t Path for alter nativebuild location (default: 'BLD' in configuration folder)136 -s Path for alter source location (default: 'src' root directory) 137 -t Path for alter build location (default: 'BLD' in configuration folder) 140 138 -v Level of verbosity ([0-3]) 141 139 … … 143 141 ¤ Configuration creation 144 142 Build : ./makenemo -[aru] ... [...] 145 Duplication: ./makenemo -n ... -[aru] ... [...]143 Copy : ./makenemo -n ... -[aru] ... [...] 146 144 ¤ Configuration management 147 145 List CPP keys : ./makenemo [...] list_key … … 190 188 export NEMO_DIR=${MAIN_DIR}/${x_s} 191 189 192 [ "${CMP_NAM}" == 190 [ "${CMP_NAM}" == 'all' ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit 193 191 194 192 … … 197 195 198 196 ## Reuse last configuration compiled if any (existing 'work_cfgs.txt') 199 if [[ $( find ./cfgs ./tests -name work_cfgs.txt ) ]]; then200 CONFIG_DIR=${MAIN_DIR}/$( ls -rt */work_cfgs.txt | awk -F/ 'END{ print $1}' )201 TML_CONF=$( tail -1 ${CONFIG_DIR}/work_cfgs.txt | awk '{ print $1 }' )202 else197 # if [[ $( find ./cfgs ./tests -name work_cfgs.txt ) ]]; then 198 # CONFIG_DIR=${MAIN_DIR}/$( ls -rt */work_cfgs.txt | awk -F/ 'END{ print $1}' ) 199 # TML_CONF=$( tail -1 ${CONFIG_DIR}/work_cfgs.txt | awk '{ print $1 }' ) 200 # else 203 201 ## No ${REF_CONF}, ${DEMO_CONF}, ${RMT_CONF} nor ${NEM_SUBDIR} and 1st compilation => exit 204 echo -e "\033[0;33m\nNo previous build 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" 202 # echo -e "\033[0;33m\nNo previous build found!" 203 echo -e "\033[0;31m\nAt least a reference configuration ('-r'), a test case ('-a'), " 204 echo -e "a remote configuration ('-u') has to be choosen!!!\033[0m" 208 205 ${COMPIL_DIR}/Flist_cfgs.sh 209 206 exit 2 210 fi207 # fi 211 208 212 209 ## At least one config has been requested 213 210 else 214 211 215 ## Argument 'all': list all available configurations212 ## 'all' arg: list all available configurations 216 213 if [[ "${REF_CONF}" == 'all' || "${DEMO_CONF}" == 'all' || "${RMT_CONF}" == 'all' ]]; then 217 214 ${COMPIL_DIR}/Flist_cfgs.sh 218 215 exit 2 216 ## Probably useless but who knows? 219 217 elif [[ -n "${REF_CONF}" && -n "${DEMO_CONF}" ]]; then 220 218 echo -e "\033[0;31m\nYou have to choose whether you work with:" 221 echo -e " - Supported referenceconfigurations in ./cfgs ('-r') or"222 echo -e " - Unsupported demonstration casesin ./tests ('-a')\033[0m\n"219 echo -e " - LTS configurations in ./cfgs ('-r') or" 220 echo -e " - Unsupported cases in ./tests ('-a')\033[0m\n" 223 221 exit 2 224 222 fi … … 229 227 230 228 if [[ ! $( grep ${RMT_CONF} ${CONFIG_DIR}/${conf_file} ) ]]; then 231 echo -e "\033[0;31m\nThe reference configuration ('-r'), demonstrationcase ('-a') or "229 echo -e "\033[0;31m\nThe reference configuration ('-r'), test case ('-a') or " 232 230 echo -e "remote configuration ('-u') selected is not available!!!" 233 echo -e "Check if you use the good option and the available items intxt files\033[0m"231 echo -e "Check the option used and the available items in .txt files\033[0m" 234 232 ${COMPIL_DIR}/Flist_cfgs.sh 235 233 exit 2 … … 254 252 echo -e "\033[0;31m\nThe reference configuration ('-r'), demonstration case ('-a') or " 255 253 echo -e "remote configuration ('-u') selected is not available!!!" 256 echo -e "Check if you use the good option and the available items intxt files\033[0m"254 echo -e "Check the option used and the available items in .txt files\033[0m" 257 255 ${COMPIL_DIR}/Flist_cfgs.sh 258 256 exit 2 … … 381 379 ## add remove for clean option 382 380 if [ ${#x_c} -ne 0 ]; then 383 rm -rf ${NEMO_TDIR}/${NEW_CONF}/AGRIFLIB 384 rm -rf ${NEMO_TDIR}/${NEW_CONF}/BLD 385 rm -f ${NEMO_TDIR}/${NEW_CONF}/EXP00/nemo 386 rm -rf ${NEMO_TDIR}/${NEW_CONF}/LONG 387 rm -rf ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES 388 rm -rf ${NEMO_TDIR}/${NEW_CONF}/REPRO_* 389 rm -rf ${NEMO_TDIR}/${NEW_CONF}/SHORT 390 rm -rf ${NEMO_TDIR}/${NEW_CONF}/WORK 391 rm -f ${COMPIL_DIR}/*history ${COMPIL_DIR}/*fcm ${COMPIL_DIR}/*txt 392 echo "cleaning ${NEW_CONF} AGRIFLIB, BLD, LONG, NEMOFILES, REPRO_*, SHORT, WORK" 393 fi 381 382 echo 'Cleaning in '${NEW_CONF}' the building folders' 383 384 for dir in AGRIFLIB BLD EXP00 LONG NEMOFILES REPRO_* SHORT WORK; do 385 rm -rf ${NEMO_TDIR}/${NEW_CONF}/$dir 386 done 387 388 for file in cpp.history cpp.fcm full_key_list.txt; do 389 rm -f ${COMPIL_DIR}/$file 390 done 391 392 fi 394 393 395 394 fi
Note: See TracChangeset
for help on using the changeset viewer.