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

Diff of /eclass/multilib.eclass

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

Revision 1.19 Revision 1.22
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/multilib.eclass,v 1.19 2005/02/09 03:22:25 eradicator Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.22 2005/02/14 11:33:11 eradicator Exp $
4# 4#
5# Author: Jeremy Huddleston <eradicator@gentoo.org> 5# Author: Jeremy Huddleston <eradicator@gentoo.org>
6# 6#
7# This eclass is for all functions pertaining to handling multilib. 7# This eclass is for all functions pertaining to handling multilib.
8# configurations. 8# configurations.
87# create_ml_includes /usr/include/asm __i386__:/usr/include/asm-i386 __x86_64__:/usr/include/asm-x86_64 87# create_ml_includes /usr/include/asm __i386__:/usr/include/asm-i386 __x86_64__:/usr/include/asm-x86_64
88 88
89### END DOCUMENTATION ### 89### END DOCUMENTATION ###
90 90
91# Defaults: 91# Defaults:
92export MULTILIB_ABIS=${MULTILIB_ABIS:-"default"}
93export DEFAULT_ABI=${DEFAULT_ABI:-"default"}
94export ABI=${ABI:-"default"}
92CFLAGS_default="" 95export CFLAGS_default=""
96export LDFLAGS_default=""
97export CHOST_default=${CHOST}
93LIBDIR_default="${CONF_LIBDIR:-lib}" 98export LIBDIR_default=${CONF_LIBDIR:-"lib"}
94CDEFINE_default="__unix__" 99export CDEFINE_default="__unix__"
95 100
96# has_multilib_profile() 101# has_multilib_profile()
97has_multilib_profile() { 102has_multilib_profile() {
98 [ -n "${MULTILIB_ABIS}" -a "${MULTILIB_ABIS}" != "${MULTILIB_ABIS/ /}" ] 103 [ -n "${MULTILIB_ABIS}" -a "${MULTILIB_ABIS}" != "${MULTILIB_ABIS/ /}" ]
99} 104}
179 184
180 local var="${flag}_${abi}" 185 local var="${flag}_${abi}"
181 echo ${!var} 186 echo ${!var}
182} 187}
183 188
184get_abi_CFLAGS() { get_abi_var CFLAGS ${@}; } 189get_abi_CFLAGS() { get_abi_var CFLAGS "${@}"; }
190get_abi_LDFLAGS() { get_abi_var LDFLAGS "${@}"; }
191get_abi_CHOST() { get_abi_var CHOST "${@}"; }
185get_abi_CDEFINE() { get_abi_var CDEFINE ${@}; } 192get_abi_CDEFINE() { get_abi_var CDEFINE "${@}"; }
186get_abi_LIBDIR() { get_abi_var LIBDIR ${@}; } 193get_abi_LIBDIR() { get_abi_var LIBDIR "${@}"; }
187 194
188# Return a list of the ABIs we want to install for with 195# Return a list of the ABIs we want to install for with
189# the last one in the list being the default. 196# the last one in the list being the default.
190get_install_abis() { 197get_install_abis() {
191 local order="" 198 local order=""
384 local file 391 local file
385 for file in $(create_ml_includes-allfiles ${basedirs}); do 392 for file in $(create_ml_includes-allfiles ${basedirs}); do
386 local name="$(echo $file | tr a-z A-Z | sed 's:[^A-Z]:_:g')" 393 local name="$(echo $file | tr a-z A-Z | sed 's:[^A-Z]:_:g')"
387 { 394 {
388 echo "/* Common header file autogenerated by create_ml_includes in multilib.eclass */" 395 echo "/* Common header file autogenerated by create_ml_includes in multilib.eclass */"
389 #echo "#ifndef __CREATE_ML_INCLUDES_STUB_${name}__"
390 #echo "#define __CREATE_ML_INCLUDES_STUB_${name}__"
391 #echo ""
392 396
393 local dir 397 local dir
394 for dir in ${basedirs}; do 398 for dir in ${basedirs}; do
395 if [ -f "${D}/${dir}/${file}" ]; then 399 if [ -f "${D}/${dir}/${file}" ]; then
396 echo "#ifdef $(create_ml_includes-sym_for_dir ${dir} ${mlinfo})" 400 local sym=$(create_ml_includes-sym_for_dir ${dir} ${mlinfo})
401 if [[ ${sym::1} == "!" ]]; then
402 echo "#ifndef ${sym:1}"
403 else
404 echo "#ifdef ${sym}"
405 fi
397 echo "#include \"$(create_ml_includes-relative_between ${dest}/$(dirname ${file}) ${dir}/${file})\"" 406 echo "#include \"$(create_ml_includes-relative_between ${dest}/$(dirname ${file}) ${dir}/${file})\""
398 echo "#endif /* $(create_ml_includes-sym_for_dir ${dir} ${mlinfo}) */" 407 echo "#endif /* ${sym} */"
399 echo "" 408 echo ""
400 fi 409 fi
401 done 410 done
402 411
403 #echo "#endif /* __CREATE_ML_INCLUDES_STUB_${name}__ */" 412 #echo "#endif /* __CREATE_ML_INCLUDES_STUB_${name}__ */"

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.20