From owner-svn-soc-all@FreeBSD.ORG Tue Jun 26 12:45:14 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 4CBAA106564A for ; Tue, 26 Jun 2012 12:45:13 +0000 (UTC) (envelope-from scher@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Tue, 26 Jun 2012 12:45:13 +0000 Date: Tue, 26 Jun 2012 12:45:13 +0000 From: scher@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120626124513.4CBAA106564A@hub.freebsd.org> Cc: Subject: socsvn commit: r238332 - soc2012/scher/par_ports/head/Mk X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2012 12:45:14 -0000 Author: scher Date: Tue Jun 26 12:45:12 2012 New Revision: 238332 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238332 Log: [fixed] new execution flow for options checking. tmp file is used, to store already checked ports, to skip them later Modified: soc2012/scher/par_ports/head/Mk/bsd.parallel.mk Modified: soc2012/scher/par_ports/head/Mk/bsd.parallel.mk ============================================================================== --- soc2012/scher/par_ports/head/Mk/bsd.parallel.mk Tue Jun 26 11:13:58 2012 (r238331) +++ soc2012/scher/par_ports/head/Mk/bsd.parallel.mk Tue Jun 26 12:45:12 2012 (r238332) @@ -480,25 +480,35 @@ ##################################################### +##################################################### +# Parallel targets section +# TODO: outline intergation with bsd.port.mk +# locking-config-recursive: locking-config-message lock-port-dbdir config-recursive unlock-port-dbdir locking-config-message: @${ECHO_MSG} "===> Setting user-specified options for ${PKGNAME} and dependencies"; +# TODO: doc is needed +_parv_CHECKED_CONFIG_F_PREFIX= already-checked-config + config-recursive: config-conditional - @for dir in $$(${MAKE} run-depends-list build-depends-list | uniq); do \ - while true; do \ - ( cd $$dir; ${MAKE} locking-config-recursive ) || { \ - status=$$?; \ - if [ $${status} -eq ${_parv_MAKE_LOCK_EXIT_STATUS} ]; then \ - sleep ${_parv_LOCK_ATTEMPT_TIMEOUT}; \ - continue; \ - else \ - exit 1; \ - fi; \ - }; \ - break; \ - done; \ + @if [ ! ${DEP_CHECK_CONFIG} ]; then \ + already_checked_file=/tmp/${_parv_CHECKED_CONFIG_F_PREFIX}.${.MAKE.PID}; \ + trap '${RM} -rf $${already_checked_file};' EXIT TERM INT; \ + ${ECHO_CMD} ${.CURDIR} > $${already_checked_file}; \ + else \ + already_checked_file=${DEP_CHECK_CONFIG}; \ + fi; \ + for dir in $$(${MAKE} run-depends-list build-depends-list | uniq); do \ + if [ ! $$(grep $${dir}$$ $${already_checked_file}) ]; then \ + ${ECHO_CMD} configure options for $${dir}; \ + ( cd $${dir}; \ + ${MAKE} "DEP_CHECK_CONFIG=$${already_checked_file}" config-recursive ); \ + ${ECHO_CMD} $${dir} >> $${already_checked_file}; \ + else \ + ${ECHO_CMD} $${dir} has been configed; \ + fi; \ done check-lock: @@ -550,4 +560,7 @@ do-unlock: @${DO_NADA} +# End of Parallel targets section +##################################################### + .endif # !defined(_POSTMKINCLUDED) && !defined(Parallel_Pre_Include)