diff options
author | John Mylchreest <johnm@gentoo.org> | 2004-12-01 18:08:57 +0000 |
---|---|---|
committer | John Mylchreest <johnm@gentoo.org> | 2004-12-01 18:08:57 +0000 |
commit | 41b68705786360952718d6e81c1697bea6114288 (patch) | |
tree | 3981bb39def6baa3330208b371cb0b3e39ac8666 | |
parent | QA: brain is not a Gentoo dev anymore (Manifest recommit) (diff) | |
download | gentoo-2-41b68705786360952718d6e81c1697bea6114288.tar.gz gentoo-2-41b68705786360952718d6e81c1697bea6114288.tar.bz2 gentoo-2-41b68705786360952718d6e81c1697bea6114288.zip |
Updating PV to PVR
-rw-r--r-- | eclass/linux-info.eclass | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index 4d312ba0943d..d4280aca9757 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.4 2004/11/28 09:47:31 johnm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.5 2004/12/01 18:08:57 johnm Exp $ # # This eclass provides functions for querying the installed kernel # source version, selected kernel options etc. @@ -20,11 +20,10 @@ KERNEL_DIR="${KERNEL_DIR:-/usr/src/linux}" # getfilevar <VARIABLE> <CONFIGFILE> getfilevar() { -local ERROR +local ERROR curpwd ERROR=0 [ -z "${1}" ] && ERROR=1 - [ -z "${2}" ] && ERROR=1 [ ! -f "${2}" ] && ERROR=1 if [ "${ERROR}" = 1 ] @@ -32,7 +31,11 @@ local ERROR eerror "getfilevar requires 2 variables, with the second a valid file." eerror " getfilevar <VARIABLE> <CONFIGFILE>" else - grep -e "^$1[= ]" $2 | sed 's: = :=:' | cut -d= -f2- + curpwd="${PWD}" + cd $(dirname ${2}) + echo $(echo -e "include $(basename ${2})\ne:\n\t@echo \$(${1})" | make -f - e) + cd ${curpwd} + # grep -e "^$1[= ]" $2 | sed 's: = :=:' | cut -d= -f2- fi } |