/[gentoo-x86]/eclass/autotools-multilib.eclass
Gentoo

Diff of /eclass/autotools-multilib.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-multilib.eclass,v 1.1 2012/10/08 18:44:30 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-multilib.eclass,v 1.2 2012/12/01 16:26:03 mgorny Exp $
4 4
5# @ECLASS: autotools-multilib.eclass 5# @ECLASS: autotools-multilib.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Michał Górny <mgorny@gentoo.org> 7# Michał Górny <mgorny@gentoo.org>
8# @BLURB: autotools-utils wrapper for multilib builds 8# @BLURB: autotools-utils wrapper for multilib builds
36 36
37# @FUNCTION: autotools-multilib_foreach_abi 37# @FUNCTION: autotools-multilib_foreach_abi
38# @USAGE: argv... 38# @USAGE: argv...
39# @DESCRIPTION: 39# @DESCRIPTION:
40# If multilib support is enabled, sets the toolchain up for each 40# If multilib support is enabled, sets the toolchain up for each
41# supported ABI along with the ABI variable and correct 41# supported ABI along with the ABI variable and correct BUILD_DIR,
42# AUTOTOOLS_BUILD_DIR, and runs the given commands with them. 42# and runs the given commands with them.
43# 43#
44# If multilib support is disabled, it just runs the commands. No setup 44# If multilib support is disabled, it just runs the commands. No setup
45# is done. 45# is done.
46autotools-multilib_foreach_abi() { 46autotools-multilib_foreach_abi() {
47 local initial_dir=${BUILD_DIR:-${S}}
48
47 if use multilib; then 49 if use multilib; then
48 local ABI 50 local ABI
49 for ABI in $(get_all_abis); do 51 for ABI in $(get_all_abis); do
50 multilib_toolchain_setup "${ABI}" 52 multilib_toolchain_setup "${ABI}"
51 AUTOTOOLS_BUILD_DIR=${S%%/}-${ABI} "${@}" 53 BUILD_DIR=${initial_dir%%/}-${ABI} "${@}"
52 done 54 done
53 else 55 else
54 "${@}" 56 "${@}"
55 fi 57 fi
56} 58}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20