/[gentoo-x86]/eclass/linux-mod.eclass
Gentoo

Diff of /eclass/linux-mod.eclass

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

Revision 1.62 Revision 1.63
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.62 2006/03/26 17:47:19 blubb Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.63 2006/04/02 19:14:10 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.
462# -------------------------------- 462# --------------------------------
463 463
464linux-mod_pkg_setup() { 464linux-mod_pkg_setup() {
465 linux-info_pkg_setup; 465 linux-info_pkg_setup;
466 check_kernel_built; 466 check_kernel_built;
467 check_modules_supported; 467 strip_modulenames;
468 [[ -n ${MODULE_NAMES} ]] && check_modules_supported
468 set_kvobj; 469 set_kvobj;
469 # Commented out with permission from johnm until a fixed version for arches 470 # Commented out with permission from johnm until a fixed version for arches
470 # who intentionally use different kernel and userland compilers can be 471 # who intentionally use different kernel and userland compilers can be
471 # introduced - Jason Wever <weeve@gentoo.org>, 23 Oct 2005 472 # introduced - Jason Wever <weeve@gentoo.org>, 23 Oct 2005
472 #check_vermagic; 473 #check_vermagic;
473} 474}
474 475
476strip_modulenames() {
477 local i
478 for i in ${MODULE_IGNORE}; do
479 MODULE_NAMES=${MODULE_NAMES//${i}(*}
480 done
481}
482
475linux-mod_src_compile() { 483linux-mod_src_compile() {
476 local modulename libdir srcdir objdir i n myARCH="${ARCH}" myABI="${ABI}" 484 local modulename libdir srcdir objdir i n myARCH="${ARCH}" myABI="${ABI}"
477 ARCH="$(tc-arch-kernel)" 485 ARCH="$(tc-arch-kernel)"
478 ABI="${KERNEL_ABI}" 486 ABI="${KERNEL_ABI}"
479 487
480 BUILD_TARGETS=${BUILD_TARGETS:-clean module} 488 BUILD_TARGETS=${BUILD_TARGETS:-clean module}
481 489 strip_modulenames;
482 for i in ${MODULE_IGNORE}
483 do
484 MODULE_NAMES=${MODULE_NAMES//${i}(*}
485 done
486
487 for i in ${MODULE_NAMES} 490 for i in ${MODULE_NAMES}
488 do 491 do
489 unset libdir srcdir objdir 492 unset libdir srcdir objdir
490 for n in $(find_module_params ${i}) 493 for n in $(find_module_params ${i})
491 do 494 do
518} 521}
519 522
520linux-mod_src_install() { 523linux-mod_src_install() {
521 local modulename libdir srcdir objdir i n 524 local modulename libdir srcdir objdir i n
522 525
523 for i in ${MODULE_IGNORE} 526 strip_modulenames;
524 do
525 MODULE_NAMES=${MODULE_NAMES//${i}(*}
526 done
527
528 for i in ${MODULE_NAMES} 527 for i in ${MODULE_NAMES}
529 do 528 do
530 unset libdir srcdir objdir 529 unset libdir srcdir objdir
531 for n in $(find_module_params ${i}) 530 for n in $(find_module_params ${i})
532 do 531 do

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.63

  ViewVC Help
Powered by ViewVC 1.1.20