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

Diff of /eclass/linux-info.eclass

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

Revision 1.100 Revision 1.101
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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-info.eclass,v 1.100 2013/02/10 07:53:31 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.101 2013/09/29 02:36:17 vapier Exp $
4 4
5# @ECLASS: linux-info.eclass 5# @ECLASS: linux-info.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kernel-misc@gentoo.org 7# kernel-misc@gentoo.org
8# @AUTHOR: 8# @AUTHOR:
427# 427#
428# The KV_DIR is set using the KERNEL_DIR env var, the KV_DIR_OUT is set using a valid 428# The KV_DIR is set using the KERNEL_DIR env var, the KV_DIR_OUT is set using a valid
429# KBUILD_OUTPUT (in a decreasing priority list, we look for the env var, makefile var or the 429# KBUILD_OUTPUT (in a decreasing priority list, we look for the env var, makefile var or the
430# symlink /lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build). 430# symlink /lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build).
431get_version() { 431get_version() {
432 local kbuild_output mkfunc tmplocal 432 local mkfunc tmplocal
433 433
434 # no need to execute this twice assuming KV_FULL is populated. 434 # no need to execute this twice assuming KV_FULL is populated.
435 # we can force by unsetting KV_FULL 435 # we can force by unsetting KV_FULL
436 [ -n "${KV_FULL}" ] && return 0 436 [ -n "${KV_FULL}" ] && return 0
437 437
495 495
496 # Decide the function used to extract makefile variables. 496 # Decide the function used to extract makefile variables.
497 mkfunc="$(get_makefile_extract_function "${KERNEL_MAKEFILE}")" 497 mkfunc="$(get_makefile_extract_function "${KERNEL_MAKEFILE}")"
498 498
499 # And if we didn't pass it, we can take a nosey in the Makefile 499 # And if we didn't pass it, we can take a nosey in the Makefile
500 if [[ -z ${OUTPUT_DIR} ]]; then
500 kbuild_output="$(${mkfunc} KBUILD_OUTPUT ${KERNEL_MAKEFILE})" 501 OUTPUT_DIR=$(${mkfunc} KBUILD_OUTPUT "${KERNEL_MAKEFILE}")
501 OUTPUT_DIR="${OUTPUT_DIR:-${kbuild_output}}" 502 fi
502 503
503 # And contrary to existing functions I feel we shouldn't trust the 504 # And contrary to existing functions I feel we shouldn't trust the
504 # directory name to find version information as this seems insane. 505 # directory name to find version information as this seems insane.
505 # so we parse ${KERNEL_MAKEFILE} 506 # so we parse ${KERNEL_MAKEFILE}
506 KV_MAJOR="$(${mkfunc} VERSION ${KERNEL_MAKEFILE})" 507 KV_MAJOR="$(${mkfunc} VERSION ${KERNEL_MAKEFILE})"

Legend:
Removed from v.1.100  
changed lines
  Added in v.1.101

  ViewVC Help
Powered by ViewVC 1.1.20