diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2005-01-16 17:45:19 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2005-01-16 17:45:19 +0000 |
commit | af714f706390a6aba6c9225bb7a54813cbd1aaec (patch) | |
tree | f6c4517ca4eb6ccab0454314eb9411286b2fe486 /eclass | |
parent | Bug #76424 (better fix). (Manifest recommit) (diff) | |
download | gentoo-2-af714f706390a6aba6c9225bb7a54813cbd1aaec.tar.gz gentoo-2-af714f706390a6aba6c9225bb7a54813cbd1aaec.tar.bz2 gentoo-2-af714f706390a6aba6c9225bb7a54813cbd1aaec.zip |
Added get_ml_incdir
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/multilib.eclass | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass index 2b1f6c07dcd4..163a45d3400f 100644 --- a/eclass/multilib.eclass +++ b/eclass/multilib.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.9 2005/01/15 13:44:31 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.10 2005/01/16 17:45:19 eradicator Exp $ # # Author: Jeremy Huddleston <eradicator@gentoo.org> # @@ -180,6 +180,35 @@ number_abis() { get_abi_order | wc -w } +# get_ml_incdir [<include dir> [<ABI>]] +# include dir defaults to /usr/include +# ABI defaults to ${ABI} or ${DEFAULT_ABI} +get_ml_incdir() { + local dir=/usr/include + + if [[ ${#} -gt 0 ]]; then + incdir=${1} + shift + fi + + if [[ -z "${MULTILIB_ABIS}" ]]; then + echo ${incdir} + return 0 + fi + + local abi=${ABI:-${DEFAULT_ABI}} + if [[ ${#} -gt 0 ]]; then + abi=${1} + shift + fi + + if [[ -d "${dir}/gentoo-multilib/${abi}" ]]; then + echo ${dir}/gentoo-multilib/${abi} + else + echo ${dir} + fi +} + # prep_ml_includes: # # Some includes (include/asm, glibc, etc) are ABI dependent. In this case, |