From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id CBFC71386AB for ; Sat, 26 Jan 2013 11:35:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6FA09E0539; Sat, 26 Jan 2013 11:35:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F019AE0539 for ; Sat, 26 Jan 2013 11:35:41 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B642E33D972 for ; Sat, 26 Jan 2013 11:35:40 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2279) id 67B712171D; Sat, 26 Jan 2013 11:35:38 +0000 (UTC) From: "Michal Gorny (mgorny)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, mgorny@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog autotools-multilib.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: ChangeLog autotools-multilib.eclass X-VCS-Directories: eclass X-VCS-Committer: mgorny X-VCS-Committer-Name: Michal Gorny Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20130126113538.67B712171D@flycatcher.gentoo.org> Date: Sat, 26 Jan 2013 11:35:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ef3951b9-da13-4661-bcf5-35206df47fc0 X-Archives-Hash: 6405c4c04f3215746a29cddc8614c541 mgorny 13/01/26 11:35:38 Modified: ChangeLog autotools-multilib.eclass Log: Support running commands in parallel and use it to run configure scripts. Revision Changes Path 1.638 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.638&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.638&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.637&r2=1.638 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.637 retrieving revision 1.638 diff -u -r1.637 -r1.638 --- ChangeLog 26 Jan 2013 11:34:16 -0000 1.637 +++ ChangeLog 26 Jan 2013 11:35:38 -0000 1.638 @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.637 2013/01/26 11:34:16 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.638 2013/01/26 11:35:38 mgorny Exp $ + + 26 Jan 2013; Michał Górny autotools-multilib.eclass: + Support running commands in parallel and use it to run configure scripts. 26 Jan 2013; Michał Górny autotools-multilib.eclass: Introduce MULTILIB_USEDEP to enforce correct dependencies. 1.5 eclass/autotools-multilib.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools-multilib.eclass?rev=1.5&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools-multilib.eclass?rev=1.5&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools-multilib.eclass?r1=1.4&r2=1.5 Index: autotools-multilib.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/autotools-multilib.eclass,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- autotools-multilib.eclass 26 Jan 2013 11:34:16 -0000 1.4 +++ autotools-multilib.eclass 26 Jan 2013 11:35:38 -0000 1.5 @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-multilib.eclass,v 1.4 2013/01/26 11:34:16 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-multilib.eclass,v 1.5 2013/01/26 11:35:38 mgorny Exp $ # @ECLASS: autotools-multilib.eclass # @MAINTAINER: @@ -28,7 +28,7 @@ die "${ECLASS}: multilib support requires out-of-source builds." fi -inherit autotools-utils multilib +inherit autotools-utils multilib multiprocessing EXPORT_FUNCTIONS src_configure src_compile src_test src_install @@ -69,8 +69,45 @@ fi } +# @FUNCTION: autotools-multilib_parallel_foreach_abi +# @USAGE: argv... +# @DESCRIPTION: +# If multilib support is enabled, sets the toolchain up for each +# supported ABI along with the ABI variable and correct BUILD_DIR, +# and runs the given commands with them. The commands are run +# in parallel with number of jobs being determined from MAKEOPTS. +# +# If multilib support is disabled, it just runs the commands. No setup +# is done. +# +# Useful for running configure scripts. +autotools-multilib_parallel_foreach_abi() { + local initial_dir=${BUILD_DIR:-${S}} + + if use multilib; then + multijob_init + + local ABI + for ABI in $(get_all_abis); do + ( + multijob_child_init + + multilib_toolchain_setup "${ABI}" + BUILD_DIR=${initial_dir%%/}-${ABI} + "${@}" + ) & + + multijob_post_fork + done + + multijob_finish + else + "${@}" + fi +} + autotools-multilib_src_configure() { - autotools-multilib_foreach_abi autotools-utils_src_configure + autotools-multilib_parallel_foreach_abi autotools-utils_src_configure } autotools-multilib_src_compile() {