Date: Wed, 26 Jul 2006 17:20:35 GMT From: Gabor Kovesdan <gabor@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 102468 for review Message-ID: <200607261720.k6QHKZ63046270@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102468 Change 102468 by gabor@gabor_spitfire on 2006/07/26 17:19:44 Convert some make substitution to sed script. Affected files ... .. //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#6 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#6 (text+ko) ==== @@ -4,7 +4,7 @@ for _S in ${MASTER_SITES}; do _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} if [ -n "$(_S_TEMP)" ] ; then - for _group in ${_S_TEMP:S/,/ /g}; do + for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do _G_TEMP= ${_group} if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default ${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @@ -20,7 +20,7 @@ for _S in ${MASTER_SITE_SUBDIR}; do _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} if [ -n "$(_S_TEMP)" ] ; then - for _group in ${_S_TEMP:S/,/ /g}; do + for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do _G_TEMP= ${_group} if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default; then ${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @@ -40,7 +40,7 @@ for _S in ${MASTER_SITES}; do _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} if [ -n "$(_S_TEMP)" ] ; then - for _group in ${_S_TEMP:S/,/ /g}; do + for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do if [ -z "$$(_MASTER_SITE_SUBDIR_${_group})" ] ; then MASTER_SITES_TMP= ${_MASTER_SITES_${_group}:S^%SUBDIR%/^^} else @@ -129,7 +129,7 @@ for _D in ${DISTFILES}; do _D_TEMP= ${_D:S/^${_D:C/:[^:]+$//}//} if [ -n "$(_D_TEMP)" ] ; then - for _group in ${_D_TEMP:S/^://:S/,/ /g}; do + for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} -e "s/^://" -e "s/,/ /g"`; do if [ -z "$$(_MASTER_SITES_${_group})" ] ; then _G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} if [ -z "$(_G_TEMP_TEMP)" ; then @@ -169,14 +169,14 @@ for _S in ${MASTER_SITES}; do _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//} if [ -n "${_S_TEMP}" ] ; then - for _group in ${_S_TEMP:S/^://:S/,/ /g}; do + for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} -e "s/^://" -e "s/,/ /g"`; do SORTED_MASTER_SITES_${_group}_CMD= cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} master-sites--${_group} ${ECHO_CMD} ${_MASTER_SITE_OVERRIDE} `${ECHO_CMD} '${_MASTER_SITES_${_group}}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP} done fi done -### FIXME: thos should be convert to be done in this script itself +### FIXME: those should be convert to be done in this script itself # # Hackery to enable simple fetch targets with several dynamic MASTER_SITES # @@ -184,7 +184,7 @@ .for _F in ${DISTFILES} _F_TEMP= ${_F:S/^${_F:C/:[^:]+$//}//:S/^://} . if !empty(_F_TEMP) -. for _group in ${_F_TEMP:S/,/ /g} +. for _group in `${ECHO_CMD} ${_F_TEMP} | ${SED} "s/,/ /g"`; do . if defined(_MASTER_SITES_${_group}) _MASTER_SITES_ENV+= _MASTER_SITES_${_group}="${_MASTER_SITES_${_group}}" . endif @@ -264,7 +264,7 @@ for _S in ${PATCH_SITES}; do _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} if [ -n "${_S_TEMP)" ; then \ - for _group in ${_S_TEMP:S/,/ /g}; do + for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do _G_TEMP= ${_group} if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default; then ${ECHO_MSG} "The words all, ALL and default are reserved and cannot be" @@ -280,7 +280,7 @@ for _S in ${PATCH_SITE_SUBDIR}; do _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} if [ -n "$(_S_TEMP)" ] ; then - for _group in ${_S_TEMP:S/,/ /g}; do + for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do _G_TEMP= ${_group} if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default; then ${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @@ -300,7 +300,7 @@ for _S in ${PATCH_SITES}; do _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} if [ -n "$(_S_TEMP)" } ; then - for _group in ${_S_TEMP:S/,/ /g}; do + for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do if [ -z "$$(_PATCH_SITE_SUBDIR_${_group})" ] ; then _S_TEMP_TEMP= ${_PATCH_SITES_${_group}:M*%SUBDIR%/*} if [ -z "$(_S_TEMP_TEMP)" ] ; then @@ -367,7 +367,7 @@ for _S in ${PATCH_SITES}; do _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//} if [ -n "${_S_TEMP}" ] ; then - for _group in ${_S_TEMP:S/^://:S/,/ /g}; do + for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} -e "s/^://" "s/,/ /g"`; do SORTED_PATCH_SITES_${_group}_CMD= cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} patch-sites-${_group} ${ECHO_CMD} ${_MASTER_SITE_OVERRIDE} `${ECHO_CMD} '${_PATCH_SITES_${_group}}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP} done @@ -380,7 +380,7 @@ .for _F in ${PATCHFILES} _F_TEMP= ${_F:S/^${_F:C/:[^:]+$//}//:S/^://} . if !empty(_F_TEMP) -. for _group in ${_F_TEMP:S/,/ /g} +. for _group in `${ECHO_CMD} ${_F_TEMP} | ${SED} "s/,/ /g"`; do . if defined(_PATCH_SITES_${_group}) _PATCH_SITES_ENV+= _PATCH_SITES_${_group}="${_PATCH_SITES_${_group}}" . endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607261720.k6QHKZ63046270>