/[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.19 Revision 1.20
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.19 2005/01/15 21:19:02 johnm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.20 2005/01/15 21:46:00 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.
227 local modulename moduledir sourcedir moduletemp file i 227 local modulename moduledir sourcedir moduletemp file i
228 228
229 file=${ROOT}/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR} 229 file=${ROOT}/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}
230 file=${file/\/\///} 230 file=${file/\/\///}
231 231
232 for i in ${MODULE_IGNORE}
233 do
234 MODULE_NAMES=${MODULE_NAMES//${i}(*}
235 done
236
232 einfo "If you would like to load this module automatically upon boot" 237 einfo "If you would like to load this module automatically upon boot"
233 einfo "please type the following as root:" 238 einfo "please type the following as root:"
234 for i in ${MODULE_NAMES} 239 for i in ${MODULE_NAMES}
235 do 240 do
236 moduletemp="$(echo ${i} | sed -e "s:\(.*\)(\(.*\)):\1 \2:")" 241 for n in $(find_module_params ${i})
237 modulename="${moduletemp/ */}" 242 do
238 moduletemp="${moduletemp/* /}" 243 eval ${n/:*}=${n/*:/}
239 # if we specify two args, then we can set moduledir 244 done
240 [ -z "${moduletemp/*:*/}" ] && moduledir="${moduletemp/:*/}" 245 libdir=${libdir:-misc}
241 # if we didnt pass the brackets, then we shouldnt accept anything
242 [ -n "${moduletemp/${modulename}/}" ] && sourcedir="${moduletemp/*:/}"
243 moduledir="${moduledir:-misc}"
244 sourcedir="${sourcedir:-${S}}" 246 srcdir=${srcdir:-${S}}
247 objdir=${objdir:-${srcdir}}
245 248
246 einfo " # echo \"${modulename}\" >> ${file}" 249 einfo " # echo \"${modulename}\" >> ${file}"
247 done 250 done
248 echo 251 echo
249} 252}
300 303
301linux-mod_src_compile() { 304linux-mod_src_compile() {
302 local modulename libdir srcdir objdir i n 305 local modulename libdir srcdir objdir i n
303 306
304 BUILD_TARGETS=${BUILD_TARGETS:-clean module} 307 BUILD_TARGETS=${BUILD_TARGETS:-clean module}
308
309 for i in ${MODULE_IGNORE}
310 do
305 MODULE_NAMES=${MODULE_NAMES//${MODULE_IGNORE}} 311 MODULE_NAMES=${MODULE_NAMES//${i}(*}
312 done
306 313
307 for i in ${MODULE_NAMES} 314 for i in ${MODULE_NAMES}
308 do 315 do
309 for n in $(find_module_params ${i}) 316 for n in $(find_module_params ${i})
310 do 317 do
327 done 334 done
328} 335}
329 336
330linux-mod_src_install() { 337linux-mod_src_install() {
331 local modulename libdir srcdir objdir i n 338 local modulename libdir srcdir objdir i n
339
340 for i in ${MODULE_IGNORE}
341 do
342 MODULE_NAMES=${MODULE_NAMES//${i}(*}
343 done
332 344
333 for i in ${MODULE_NAMES} 345 for i in ${MODULE_NAMES}
334 do 346 do
335 for n in $(find_module_params ${i}) 347 for n in $(find_module_params ${i})
336 do 348 do

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

  ViewVC Help
Powered by ViewVC 1.1.20