Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: reavertm@g.o, scarabeus@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 2/4] autotools-multilib: use and support BUILD_DIR.
Date: Thu, 29 Nov 2012 13:41:17
Message-Id: 1354196458-17485-3-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] autotools-utils & cmake-utils: use common BUILD_DIR var by "Michał Górny"
1 ---
2 gx86/eclass/autotools-multilib.eclass | 8 +++++---
3 1 file changed, 5 insertions(+), 3 deletions(-)
4
5 diff --git a/gx86/eclass/autotools-multilib.eclass b/gx86/eclass/autotools-multilib.eclass
6 index f6d1feb..541e934 100644
7 --- a/gx86/eclass/autotools-multilib.eclass
8 +++ b/gx86/eclass/autotools-multilib.eclass
9 @@ -38,17 +38,19 @@ IUSE=multilib
10 # @USAGE: argv...
11 # @DESCRIPTION:
12 # If multilib support is enabled, sets the toolchain up for each
13 -# supported ABI along with the ABI variable and correct
14 -# AUTOTOOLS_BUILD_DIR, and runs the given commands with them.
15 +# supported ABI along with the ABI variable and correct BUILD_DIR,
16 +# and runs the given commands with them.
17 #
18 # If multilib support is disabled, it just runs the commands. No setup
19 # is done.
20 autotools-multilib_foreach_abi() {
21 + local initial_dir=${BUILD_DIR:-${S}}
22 +
23 if use multilib; then
24 local ABI
25 for ABI in $(get_all_abis); do
26 multilib_toolchain_setup "${ABI}"
27 - AUTOTOOLS_BUILD_DIR=${S%%/}-${ABI} "${@}"
28 + BUILD_DIR=${initial_dir%%/}-${ABI} "${@}"
29 done
30 else
31 "${@}"
32 --
33 1.8.0