Date: Mon, 24 Jul 2006 18:34:54 GMT From: Gabor Kovesdan <gabor@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 102305 for review Message-ID: <200607241834.k6OIYsh8023043@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102305 Change 102305 by gabor@gabor_spitfire on 2006/07/24 18:34:40 Move some PATCH_SITES_* code. This is still a work in progress, I just moved the code and converted it syntactically. Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#58 edit .. //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#3 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#58 (text+ko) ==== @@ -2376,9 +2376,7 @@ # Empty declaration to avoid "variable MASTER_SITES recursive" error MASTER_SITES?= -PATCH_SITES?= _MASTER_SITES_DEFAULT?= -_PATCH_SITES_DEFAULT?= # Feed internal _{MASTER,PATCH}_SITES_n where n is a group designation # as per grouping rules (:something) @@ -2401,23 +2399,6 @@ _MASTER_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} . endif .endfor -.for _S in ${PATCH_SITES} -_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} -_G_TEMP= ${_group} -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default -check-makevars:: - @${ECHO_MSG} "The words all, ALL and default are reserved and cannot be" - @${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITES" - @${FALSE} -. endif -_PATCH_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} -. endfor -. else -_PATCH_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} -. endif -.endfor # Feed internal _{MASTER,PATCH}_SITE_SUBDIR_n where n is a group designation # as per grouping rules (:something) @@ -2444,27 +2425,6 @@ . endif . endif .endfor -.for _S in ${PATCH_SITE_SUBDIR} -_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} -_G_TEMP= ${_group} -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default -check-makevars:: - @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" - @${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITE_SUBDIR" - @${FALSE} -. endif -. if defined(_PATCH_SITES_${_group}) -_PATCH_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} -. endif -. endfor -. else -. if defined(_PATCH_SITES_DEFAULT) -_PATCH_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} -. endif -. endif -.endfor # Substitute subdirectory names # XXX simpler/faster solution but not the best space wise, suggestions please @@ -2518,56 +2478,6 @@ .endif _MASTER_SITES_DEFAULT:= ${MASTER_SITES_TMP} MASTER_SITES_TMP= -.for _S in ${PATCH_SITES} -_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} -. if !defined(_PATCH_SITE_SUBDIR_${_group}) -PATCH_SITES_TMP= ${_PATCH_SITES_${_group}:S^%SUBDIR%/^^} -. else -_S_TEMP_TEMP= ${_PATCH_SITES_${_group}:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) -PATCH_SITES_TMP= ${_PATCH_SITES_${_group}} -. else -PATCH_SITES_TMP= -. for site in ${_PATCH_SITES_${_group}} -_S_TEMP_TEMP= ${site:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) -PATCH_SITES_TMP+= ${site} -. else -. for dir in ${_PATCH_SITE_SUBDIR_${_group}} -PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} -. endfor -. endif -. endfor -. endif -. endif -_PATCH_SITES_${_group}:= ${PATCH_SITES_TMP} -. endfor -. endif -.endfor -.if defined(_PATCH_SITE_SUBDIR_DEFAULT) -_S_TEMP= ${_PATCH_SITES_DEFAULT:M*%SUBDIR%/*} -. if empty(_S_TEMP) -PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT} -. else -PATCH_SITES_TMP= -. for site in ${_PATCH_SITES_DEFAULT} -_S_TEMP_TEMP= ${site:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) -PATCH_SITES_TMP+= ${site} -. else -. for dir in ${_PATCH_SITE_SUBDIR_DEFAULT} -PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} -. endfor -. endif -. endfor -. endif -.else -PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT:S^%SUBDIR%/^^} -.endif -_PATCH_SITES_DEFAULT:= ${PATCH_SITES_TMP} -PATCH_SITES_TMP= # The primary backup site. MASTER_SITE_BACKUP?= \ @@ -2601,7 +2511,6 @@ # according to grouping rules (:something) DISTFILES?= ${DISTNAME}${EXTRACT_SUFX} _MASTER_SITES_ALL= ${_MASTER_SITES_DEFAULT} -_PATCH_SITES_ALL= ${_PATCH_SITES_DEFAULT} _G_TEMP= DEFAULT .for _D in ${DISTFILES} _D_TEMP= ${_D:S/^${_D:C/:[^:]+$//}//} @@ -2620,24 +2529,6 @@ _DISTFILES+= ${_D} . endif .endfor -_G_TEMP= DEFAULT -.for _P in ${PATCHFILES} -_P_TEMP= ${_P:S/^${_P:C/:[^:]+$//}//} -. if !empty(_P_TEMP) -. for _group in ${_P_TEMP:S/^://:S/,/ /g} -. if !defined(_PATCH_SITES_${_group}) -_G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} -. if empty(_G_TEMP_TEMP) -_G_TEMP+= ${_group} -_PATCH_SITES_ALL+= ${_PATCH_SITES_${_group}} -. endif -. endif -. endfor -_PATCHFILES+= ${_P:C/:[^:]+$//} -. else -_PATCHFILES+= ${_P} -. endif -.endfor _G_TEMP= _G_TEMP_TEMP= ALLFILES?= ${_DISTFILES} ${_PATCHFILES} ==== //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#3 (text+ko) ==== @@ -69,6 +69,109 @@ done if [ -z "${PATCHFILES}" ] ; then + 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 + _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" + ${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITES" + exit 1 + fi + _PATCH_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} + done + else + _PATCH_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} + fi + done + 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 + _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" + ${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITE_SUBDIR" + exit 1 + fi + if [ -n "$(_PATCH_SITES_${_group})" ] ; then + _PATCH_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} + fi + done + else + if [ -n "$(_PATCH_SITES_DEFAULT)" ] ; then + _PATCH_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} + fi + fi + done + 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 + if [ -z "$$(_PATCH_SITE_SUBDIR_${_group})" ] ; then + _S_TEMP_TEMP= ${_PATCH_SITES_${_group}:M*%SUBDIR%/*} + if [ -z "$(_S_TEMP_TEMP)" ] ; then + PATCH_SITES_TMP= ${_PATCH_SITES_${_group}} + else + PATCH_SITES_TMP= + for site in $${_PATCH_SITES_${_group}}; do + _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} + if [ -z "$(_S_TEMP_TEMP)" ] ; then + PATCH_SITES_TMP+= ${site} + else + for dir in $${_PATCH_SITE_SUBDIR_${_group}}; do + PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} + dine + fi + done + fi + fi + PATCH_SITES_${_group}:= ${PATCH_SITES_TMP} + done + fi + done + if [ -n "$(_PATCH_SITE_SUBDIR_DEFAULT)" ] ; then + _S_TEMP= ${_PATCH_SITES_DEFAULT:M*%SUBDIR%/*} + if [ -z "$(_S_TEMP)" ] ; then + PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT} + else + PATCH_SITES_TMP= + for site in ${_PATCH_SITES_DEFAULT}; do + _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} + if [ -z "$(_S_TEMP_TEMP)" ] ; then + PATCH_SITES_TMP+= ${site} + else + for dir in ${_PATCH_SITE_SUBDIR_DEFAULT}; do + PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} + done + fi + done + fi + else + PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT:S^%SUBDIR%/^^} + fi + _PATCH_SITES_DEFAULT:= ${PATCH_SITES_TMP} + PATCH_SITES_TMP= + _PATCH_SITES_ALL= ${_PATCH_SITES_DEFAULT} + _G_TEMP= DEFAULT + for _P in ${PATCHFILES}; do + _P_TEMP= ${_P:S/^${_P:C/:[^:]+$//}//} + if [ -n "$(_P_TEMP)" ] ; then + for _group in ${_P_TEMP:S/^://:S/,/ /g}; do + if [ -z "$$(_PATCH_SITES_${_group})" ] ; then + _G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} + if [ -z "$(_G_TEMP_TEMP)" ] ; then + _G_TEMP+= ${_group} + _PATCH_SITES_ALL+= $${_PATCH_SITES_${_group}} + fi + fi + done + _PATCHFILES+= ${_P:C/:[^:]+$//} + else + _PATCHFILES+= ${_P} + fi + done cd ${_DISTDIR} ${_PATCH_SITES_ENV} for _file in ${PATCHFILES}; do
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607241834.k6OIYsh8023043>