Ignore:
Timestamp:
03/31/08 11:59:44 (15 years ago)
Author:
bellier
Message:

JB:

  • updated ins_make to avoid conflicts with target names
  • enhanced the help of ins_make
  • updated AA_make.gdef
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modipsl/trunk/util/ins_make

    r293 r294  
    66function ins_make_Usage 
    77{ 
    8 echo " 
     8typeset -L13 h_n; typeset v0 v1 v2 v3 v4 v5 v6 v7; 
     9print - " 
    910ins_make install the Makefile in the directories 
    1011 
     
    2627  ins_make -t sx8brodie 
    2728" 
     29print - "Supported targets :\n" 
     30[[ ! -f "${MKTG}" ]] && { print - "? (${MKTG} unreachable)\n"; exit 3; } 
     31while read v1 v2 v3 v4 v5 v6 v7 
     32  do 
     33    [[ -n "${v1}" && "${v1}${v3}" = '#-Q-#-'                       && \ 
     34       -n "${v4}" && "${v4}${v5}${v6}" = 'Globaldefinitionsfor' ]] && \ 
     35     { h_n=${v2}; print - "${h_n} : ${v7}"; } 
     36  done <${MKTG} 
     37print - " 
     38Fot other targets, look in ${MKTG}. 
     39" 
    2840} 
    2941#-    dirname     and      basename 
    3042d_n=$(dirname ${0}); b_n=$(basename ${0}); 
     43#- File containing global definitions 
     44MKTG=${d_n}'/AA_make.gdef' 
    3145#- Retrieving and validation of the options 
    3246x_v='silencious'; x_d='normal'; x_p="??"; x_t="??"; x_m='??'; 
     
    7084      { echo "Local_Host not supported" 1>&2; exit 1; }; } 
    7185#- 
    72 MKTG=${d_n}'/AA_make.gdef' 
    7386[[ ! -f "${MKTG}" ]] && { echo "${MKTG} unreachable ..."; exit 3; } 
    7487#- 
    75 W_XX=$(sed -n -e "s/^#-Q-  *\(${x_t}\) .*$/\1/p" ${MKTG} | sort -u); 
     88W_XX=$(sed -n -e "s/^#-Q-  *\(${x_t}\)[\t ].*$/\1/p" ${MKTG} | sort -u); 
    7689[[ '\?'"${W_XX}" != '\?'"${x_t}" ]] && \ 
    7790  { echo "Target_Host  "${x_t}"  not supported" 1>&2; exit 1; } 
     
    101114  MKTR="${j}"'/AA_make'; 
    102115  cat ${MKTL} ${MKTG} ${MKTR} > mk1.$$; 
    103   W_PR='#-Q- '; W_XX=${W_PR}${x_t}; 
    104   sed -e "/^${W_XX} */ s///" -e "/^${W_PR}/d" mk1.$$ > mk2.$$; 
     116  W_PR='#-Q-  *'; W_XX=${W_PR}${x_t}; 
     117  sed -e "/^${W_XX}[\t ]/ s/^${W_XX} *//" -e "/^${W_PR}/d" mk1.$$ > mk2.$$; 
    105118#- 
    106119# Default INTEGER and REAL precision 
Note: See TracChangeset for help on using the changeset viewer.