Changeset 10587


Ignore:
Timestamp:
2019-01-27T20:54:26+01:00 (18 months ago)
Author:
nicolasmartin
Message:

Modification of makenemo conception: -[rau] option is mandatory in any case even for a preceding build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utils/build/makenemo

    r10289 r10587  
    121121./makenemo -[aru] CONFIG -m ARCH [-[dehjntv] ...] [{list_key,clean,clean_config}] [{add_key,del_key} ...] 
    122122 
    123 The previous build is reused by default if no mandatory option given 
    124  
    125123Mandatory: 
    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) 
    131129 
    132130Optional: 
    133    -d   Set of new sub-components (space separated list from ./src directory) 
    134    -e   Path for alternative patch  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) 
    135133   -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) 
    137135   -n   Name for new configuration 
    138    -s   Path for alternative source location (default: 'src' root directory) 
    139    -t   Path for alternative build  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) 
    140138   -v   Level of verbosity ([0-3]) 
    141139 
     
    143141   ¤ Configuration creation 
    144142        Build          : ./makenemo -[aru] ... [...] 
    145         Duplication    : ./makenemo -n ...  -[aru] ... [...] 
     143        Copy           : ./makenemo -n ...  -[aru] ... [...] 
    146144   ¤ Configuration management 
    147145        List CPP keys  : ./makenemo [...] list_key 
     
    190188export NEMO_DIR=${MAIN_DIR}/${x_s} 
    191189 
    192 [ "${CMP_NAM}" ==  'all' ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit 
     190[ "${CMP_NAM}" == 'all' ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit 
    193191 
    194192 
     
    197195 
    198196      ## 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}/work_cfgs.txt | awk '{ print $1 }' ) 
    202       else 
     197#     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 
    203201         ## 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" 
    208205         ${COMPIL_DIR}/Flist_cfgs.sh 
    209206         exit 2 
    210       fi 
     207#     fi 
    211208 
    212209## At least one config has been requested 
    213210else 
    214211 
    215    ## Argument 'all': list all available configurations 
     212   ## 'all' arg: list all available configurations 
    216213   if [[ "${REF_CONF}" == 'all' || "${DEMO_CONF}" == 'all' || "${RMT_CONF}" == 'all' ]]; then 
    217214      ${COMPIL_DIR}/Flist_cfgs.sh 
    218215      exit 2 
     216   ## Probably useless but who knows? 
    219217   elif [[ -n "${REF_CONF}" && -n "${DEMO_CONF}" ]]; then 
    220218      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" 
     219      echo -e "  - LTS configurations in ./cfgs  ('-r') or" 
     220      echo -e "  - Unsupported cases  in ./tests ('-a')\033[0m\n" 
    223221      exit 2 
    224222   fi 
     
    229227 
    230228      if [[ ! $( grep ${RMT_CONF} ${CONFIG_DIR}/${conf_file} ) ]]; then 
    231             echo -e "\033[0;31m\nThe reference configuration ('-r'), demonstration case ('-a') or " 
     229            echo -e "\033[0;31m\nThe reference configuration ('-r'), test case ('-a') or " 
    232230            echo -e "remote configuration ('-u') selected is not available!!!" 
    233             echo -e "Check if you use the good option and the available items in txt files\033[0m" 
     231            echo -e "Check the option used and the available items in .txt files\033[0m" 
    234232            ${COMPIL_DIR}/Flist_cfgs.sh 
    235233            exit 2 
     
    254252   echo -e "\033[0;31m\nThe reference configuration ('-r'), demonstration case ('-a') or " 
    255253   echo -e "remote configuration ('-u') selected is not available!!!" 
    256    echo -e "Check if you use the good option and the available items in txt files\033[0m" 
     254   echo -e "Check the option used and the available items in .txt files\033[0m" 
    257255   ${COMPIL_DIR}/Flist_cfgs.sh 
    258256   exit 2 
     
    381379   ## add remove for clean option 
    382380   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 
    394393 
    395394fi 
Note: See TracChangeset for help on using the changeset viewer.