/[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.105 Revision 1.106
1# Copyright 1999-2015 Gentoo Foundation 1# Copyright 1999-2015 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.105 2015/05/09 08:03:40 ulm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.106 2015/06/02 04:27:35 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:
527 527
528 # and in newer versions we can also pull LOCALVERSION if it is set. 528 # and in newer versions we can also pull LOCALVERSION if it is set.
529 # but before we do this, we need to find if we use a different object directory. 529 # but before we do this, we need to find if we use a different object directory.
530 # This *WILL* break if the user is using localversions, but we assume it was 530 # This *WILL* break if the user is using localversions, but we assume it was
531 # caught before this if they are. 531 # caught before this if they are.
532 if [[ -z ${OUTPUT_DIR} ]] ; then
533 # Try to locate a kernel that is most relevant for us.
534 for OUTPUT_DIR in "${SYROOT}" "${ROOT}" "" ; do
532 OUTPUT_DIR="${OUTPUT_DIR:-/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build}" 535 OUTPUT_DIR+="/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build"
536 if [[ -e ${OUTPUT_DIR} ]] ; then
537 break
538 fi
539 done
540 fi
533 541
534 [ -h "${OUTPUT_DIR}" ] && KV_OUT_DIR="$(readlink -f ${OUTPUT_DIR})" 542 [ -h "${OUTPUT_DIR}" ] && KV_OUT_DIR="$(readlink -f ${OUTPUT_DIR})"
535 [ -d "${OUTPUT_DIR}" ] && KV_OUT_DIR="${OUTPUT_DIR}" 543 [ -d "${OUTPUT_DIR}" ] && KV_OUT_DIR="${OUTPUT_DIR}"
536 if [ -n "${KV_OUT_DIR}" ]; 544 if [ -n "${KV_OUT_DIR}" ];
537 then 545 then

Legend:
Removed from v.1.105  
changed lines
  Added in v.1.106

  ViewVC Help
Powered by ViewVC 1.1.20