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

Diff of /eclass/multilib-build.eclass

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

Revision 1.6 Revision 1.7
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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/multilib-build.eclass,v 1.6 2013/02/27 23:23:11 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.7 2013/03/02 18:18:13 mgorny Exp $
4 4
5# @ECLASS: multilib-build.eclass 5# @ECLASS: multilib-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Michał Górny <mgorny@gentoo.org> 7# Michał Górny <mgorny@gentoo.org>
8# @BLURB: flags and utility functions for building multilib packages 8# @BLURB: flags and utility functions for building multilib packages
79 fi 79 fi
80 done 80 done
81 done 81 done
82 82
83 if [[ ! ${found} ]]; then 83 if [[ ! ${found} ]]; then
84 # ${ABI} can be used to override the fallback (multilib-portage),
85 # ${DEFAULT_ABI} is the safe fallback.
86 local abi=${ABI:-${DEFAULT_ABI}}
87
84 debug-print "${FUNCNAME}: no ABIs enabled, fallback to ${DEFAULT_ABI}" 88 debug-print "${FUNCNAME}: no ABIs enabled, fallback to ${abi}"
85 echo ${DEFAULT_ABI} 89 debug-print "${FUNCNAME}: ABI=${ABI}, DEFAULT_ABI=${DEFAULT_ABI}"
90 echo ${abi}
86 fi 91 fi
87} 92}
88 93
89# @FUNCTION: multilib_foreach_abi 94# @FUNCTION: multilib_foreach_abi
90# @USAGE: <argv>... 95# @USAGE: <argv>...
96# If multilib support is disabled, it just runs the commands. No setup 101# If multilib support is disabled, it just runs the commands. No setup
97# is done. 102# is done.
98multilib_foreach_abi() { 103multilib_foreach_abi() {
99 local initial_dir=${BUILD_DIR:-${S}} 104 local initial_dir=${BUILD_DIR:-${S}}
100 105
106 local abis=( $(multilib_get_enabled_abis) )
101 local ABI 107 local ABI
102 for ABI in $(multilib_get_enabled_abis); do 108 for ABI in "${abis[@]}"; do
103 multilib_toolchain_setup "${ABI}" 109 multilib_toolchain_setup "${ABI}"
104 BUILD_DIR=${initial_dir%%/}-${ABI} "${@}" 110 BUILD_DIR=${initial_dir%%/}-${ABI} "${@}"
105 done 111 done
106} 112}
107 113
120multilib_parallel_foreach_abi() { 126multilib_parallel_foreach_abi() {
121 local initial_dir=${BUILD_DIR:-${S}} 127 local initial_dir=${BUILD_DIR:-${S}}
122 128
123 multijob_init 129 multijob_init
124 130
131 local abis=( $(multilib_get_enabled_abis) )
125 local ABI 132 local ABI
126 for ABI in $(multilib_get_enabled_abis); do 133 for ABI in "${abis[@]}"; do
127 ( 134 (
128 multijob_child_init 135 multijob_child_init
129 136
130 multilib_toolchain_setup "${ABI}" 137 multilib_toolchain_setup "${ABI}"
131 BUILD_DIR=${initial_dir%%/}-${ABI} 138 BUILD_DIR=${initial_dir%%/}-${ABI}

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20