| 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/linux-mod.eclass,v 1.91 2008/11/01 23:19:15 dsd Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.93 2008/11/05 12:00:19 dsd Exp $ |
| 4 | |
4 | |
| 5 | # Author(s): John Mylchreest <johnm@gentoo.org>, |
5 | # Author(s): John Mylchreest <johnm@gentoo.org>, |
| 6 | # Stefan Schweizer <genstef@gentoo.org> |
6 | # Stefan Schweizer <genstef@gentoo.org> |
| 7 | # Maintainer: kernel-misc@gentoo.org |
7 | # Maintainer: kernel-misc@gentoo.org |
| 8 | # |
8 | # |
| … | |
… | |
| 134 | EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm |
134 | EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm |
| 135 | |
135 | |
| 136 | IUSE="kernel_linux" |
136 | IUSE="kernel_linux" |
| 137 | SLOT="0" |
137 | SLOT="0" |
| 138 | DESCRIPTION="Based on the $ECLASS eclass" |
138 | DESCRIPTION="Based on the $ECLASS eclass" |
| 139 | # Restrict distributed compile of kernel modules bugs #120001, #167844 |
|
|
| 140 | RESTRICT="distcc" |
|
|
| 141 | RDEPEND="kernel_linux? ( virtual/modutils )" |
139 | RDEPEND="kernel_linux? ( virtual/modutils )" |
| 142 | DEPEND="${RDEPEND} |
140 | DEPEND="${RDEPEND} |
| 143 | sys-apps/sed" |
141 | sys-apps/sed" |
| 144 | |
142 | |
| 145 | # eclass utilities |
143 | # eclass utilities |
| … | |
… | |
| 614 | ABI="${KERNEL_ABI}" |
612 | ABI="${KERNEL_ABI}" |
| 615 | |
613 | |
| 616 | BUILD_TARGETS=${BUILD_TARGETS:-clean module} |
614 | BUILD_TARGETS=${BUILD_TARGETS:-clean module} |
| 617 | strip_modulenames; |
615 | strip_modulenames; |
| 618 | cd "${S}" |
616 | cd "${S}" |
|
|
617 | touch Module.symvers |
| 619 | for i in ${MODULE_NAMES} |
618 | for i in ${MODULE_NAMES} |
| 620 | do |
619 | do |
| 621 | unset libdir srcdir objdir |
620 | unset libdir srcdir objdir |
| 622 | for n in $(find_module_params ${i}) |
621 | for n in $(find_module_params ${i}) |
| 623 | do |
622 | do |
| … | |
… | |
| 628 | objdir=${objdir:-${srcdir}} |
627 | objdir=${objdir:-${srcdir}} |
| 629 | |
628 | |
| 630 | if [ ! -f "${srcdir}/.built" ]; |
629 | if [ ! -f "${srcdir}/.built" ]; |
| 631 | then |
630 | then |
| 632 | cd ${srcdir} |
631 | cd ${srcdir} |
|
|
632 | ln -s "${S}"/Module.symvers Module.symvers |
| 633 | einfo "Preparing ${modulename} module" |
633 | einfo "Preparing ${modulename} module" |
| 634 | if [[ -n ${ECONF_PARAMS} ]] |
634 | if [[ -n ${ECONF_PARAMS} ]] |
| 635 | then |
635 | then |
| 636 | econf ${ECONF_PARAMS} || \ |
636 | econf ${ECONF_PARAMS} || \ |
| 637 | die "Unable to run econf ${ECONF_PARAMS}" |
637 | die "Unable to run econf ${ECONF_PARAMS}" |