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.20 2005/01/15 21:46:00 johnm Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.21 2005/01/16 12:24:23 johnm Exp $ |
4 | |
4 | |
5 | # Description: This eclass is used to interface with linux-info in such a way |
5 | # Description: This eclass is used to interface with linux-info in such a way |
6 | # to provide the functionality required and initial functions |
6 | # to provide the functionality required and initial functions |
7 | # required to install external modules against a kernel source |
7 | # required to install external modules against a kernel source |
8 | # tree. |
8 | # tree. |
… | |
… | |
300 | check_modules_supported; |
300 | check_modules_supported; |
301 | set_kvobj; |
301 | set_kvobj; |
302 | } |
302 | } |
303 | |
303 | |
304 | linux-mod_src_compile() { |
304 | linux-mod_src_compile() { |
305 | local modulename libdir srcdir objdir i n |
305 | local modulename libdir srcdir objdir i n myARCH=${ARCH} |
|
|
306 | unset ARCH |
306 | |
307 | |
307 | BUILD_TARGETS=${BUILD_TARGETS:-clean module} |
308 | BUILD_TARGETS=${BUILD_TARGETS:-clean module} |
308 | |
309 | |
309 | for i in ${MODULE_IGNORE} |
310 | for i in ${MODULE_IGNORE} |
310 | do |
311 | do |
… | |
… | |
323 | |
324 | |
324 | if [ ! -f "${srcdir}/.built" ]; |
325 | if [ ! -f "${srcdir}/.built" ]; |
325 | then |
326 | then |
326 | cd ${srcdir} |
327 | cd ${srcdir} |
327 | einfo "Preparing ${modulename} module" |
328 | einfo "Preparing ${modulename} module" |
328 | env -u ARCH emake ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} \ |
329 | emake ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} \ |
329 | || die "Unable to make \ |
330 | || die "Unable to make \ |
330 | ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}." |
331 | ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}." |
331 | touch ${srcdir}/.built |
332 | touch ${srcdir}/.built |
332 | cd ${OLDPWD} |
333 | cd ${OLDPWD} |
333 | fi |
334 | fi |
334 | done |
335 | done |
|
|
336 | |
|
|
337 | ARCH=${myARCH} |
335 | } |
338 | } |
336 | |
339 | |
337 | linux-mod_src_install() { |
340 | linux-mod_src_install() { |
338 | local modulename libdir srcdir objdir i n |
341 | local modulename libdir srcdir objdir i n |
339 | |
342 | |