Changeset 294 for modipsl/trunk/util/ins_make
- Timestamp:
- 03/31/08 11:59:44 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modipsl/trunk/util/ins_make
r293 r294 6 6 function ins_make_Usage 7 7 { 8 echo " 8 typeset -L13 h_n; typeset v0 v1 v2 v3 v4 v5 v6 v7; 9 print - " 9 10 ins_make install the Makefile in the directories 10 11 … … 26 27 ins_make -t sx8brodie 27 28 " 29 print - "Supported targets :\n" 30 [[ ! -f "${MKTG}" ]] && { print - "? (${MKTG} unreachable)\n"; exit 3; } 31 while 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} 37 print - " 38 Fot other targets, look in ${MKTG}. 39 " 28 40 } 29 41 #- dirname and basename 30 42 d_n=$(dirname ${0}); b_n=$(basename ${0}); 43 #- File containing global definitions 44 MKTG=${d_n}'/AA_make.gdef' 31 45 #- Retrieving and validation of the options 32 46 x_v='silencious'; x_d='normal'; x_p="??"; x_t="??"; x_m='??'; … … 70 84 { echo "Local_Host not supported" 1>&2; exit 1; }; } 71 85 #- 72 MKTG=${d_n}'/AA_make.gdef'73 86 [[ ! -f "${MKTG}" ]] && { echo "${MKTG} unreachable ..."; exit 3; } 74 87 #- 75 W_XX=$(sed -n -e "s/^#-Q- *\(${x_t}\) 88 W_XX=$(sed -n -e "s/^#-Q- *\(${x_t}\)[\t ].*$/\1/p" ${MKTG} | sort -u); 76 89 [[ '\?'"${W_XX}" != '\?'"${x_t}" ]] && \ 77 90 { echo "Target_Host "${x_t}" not supported" 1>&2; exit 1; } … … 101 114 MKTR="${j}"'/AA_make'; 102 115 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.$$; 105 118 #- 106 119 # Default INTEGER and REAL precision
Note: See TracChangeset
for help on using the changeset viewer.