/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

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

Revision 1.136 Revision 1.137
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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/eutils.eclass,v 1.136 2005/01/07 11:13:38 eradicator Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.137 2005/01/07 11:21:42 eradicator Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
8# have to implement themselves. 8# have to implement themselves.
1666# If <ABI> is not specified and ${ABI} is not defined, ${DEFAULT_ABI} is used. 1666# If <ABI> is not specified and ${ABI} is not defined, ${DEFAULT_ABI} is used.
1667# If <ABI> is not specified and ${ABI} and ${DEFAULT_ABI} are not defined, we return an empty string. 1667# If <ABI> is not specified and ${ABI} and ${DEFAULT_ABI} are not defined, we return an empty string.
1668# 1668#
1669# Jeremy Huddleston <eradicator@gentoo.org> 1669# Jeremy Huddleston <eradicator@gentoo.org>
1670get_abi_var() { 1670get_abi_var() {
1671 local flag=$1 1671 local flag=${1}
1672 local abi 1672 local abi
1673 if [ $# -gt 1 ]; then 1673 if [ $# -gt 1 ]; then
1674 abi=$1 1674 abi=${2}
1675 elif [ -n "${ABI}" ]; then 1675 elif [ -n "${ABI}" ]; then
1676 abi=${ABI} 1676 abi=${ABI}
1677 elif [ -n "${DEFAULT_ABI}" ]; then 1677 elif [ -n "${DEFAULT_ABI}" ]; then
1678 abi=${DEFAULT_ABI} 1678 abi=${DEFAULT_ABI}
1679 else 1679 else
1682 1682
1683 local var="${flag}_${abi}" 1683 local var="${flag}_${abi}"
1684 echo ${!var} 1684 echo ${!var}
1685} 1685}
1686 1686
1687get_abi_CFLAGS() { get_abi_var CFLAGS $1; } 1687get_abi_CFLAGS() { get_abi_var CFLAGS ${@}; }
1688get_abi_CXXFLAGS() { get_abi_var CXXFLAGS $1; } 1688get_abi_CXXFLAGS() { get_abi_var CXXFLAGS ${@}; }
1689get_abi_ASFLAGS() { get_abi_var ASFLAGS $1; } 1689get_abi_ASFLAGS() { get_abi_var ASFLAGS ${@}; }
1690get_abi_LIBDIR() { get_abi_var LIBDIR $1; } 1690get_abi_LIBDIR() { get_abi_var LIBDIR ${@}; }
1691

Legend:
Removed from v.1.136  
changed lines
  Added in v.1.137

  ViewVC Help
Powered by ViewVC 1.1.20