/[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.6 Revision 1.8
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.6 2004/12/06 18:33:11 johnm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.8 2004/12/06 22:05:08 johnm Exp $
4 4
5# This eclass provides functions for compiling external kernel modules 5# This eclass provides functions for compiling external kernel modules
6# from source. 6# from source.
7 7
8inherit linux-info 8inherit linux-info
26use_m() { 26use_m() {
27 # if we haven't determined the version yet, we need too. 27 # if we haven't determined the version yet, we need too.
28 get_version; 28 get_version;
29 29
30 # if the kernel version is greater than 2.6.6 then we should use 30 # if the kernel version is greater than 2.6.6 then we should use
31 # M= instead of SUBDIR= 31 # M= instead of SUBDIRS=
32 [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -gt 5 -a ${KV_PATCH} -gt 5 ] && \ 32 [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -gt 5 -a ${KV_PATCH} -gt 5 ] && \
33 return 0 || return 1 33 return 0 || return 1
34} 34}
35 35
36convert_to_m() { 36convert_to_m() {
37 [ ! -f "${1}" ] && die "convert_to_m() requires a filename as an argument" 37 [ ! -f "${1}" ] && die "convert_to_m() requires a filename as an argument"
38 if use_m 38 if use_m
39 then 39 then
40 ebegin "Converting ${1/${WORKDIR}\//} to use M= instead of SUBDIR=" 40 ebegin "Converting ${1/${WORKDIR}\//} to use M= instead of SUBDIRS="
41 sed -i 's:SUBDIRS=:M=:g' ${1} 41 sed -i 's:SUBDIRS=:M=:g' ${1}
42 eend $? 42 eend $?
43 fi 43 fi
44} 44}
45 45
129 sourcedir="${module_temp/*:/}" 129 sourcedir="${module_temp/*:/}"
130 sourcedir="${sourcedir:-${S}}" 130 sourcedir="${sourcedir:-${S}}"
131 131
132 einfo "Preparing ${modulename} module" 132 einfo "Preparing ${modulename} module"
133 cd ${sourcedir} 133 cd ${sourcedir}
134 emake clean || die Unable to make clean.
135 emake ${BUILD_PARAMS} module || die Unable to make ${BUILD_PARAMS} module. 134 emake ${BUILD_PARAMS} ${BUILD_TARGETS:-clean module} || die Unable to make ${BUILD_PARAMS} ${BUILD_TARGETS:-clean module}.
136 done 135 done
137 ARCH="${xarch}" 136 ARCH="${xarch}"
138} 137}
139 138
140linux-mod_src_install() { 139linux-mod_src_install() {

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20