/[gentoo-x86]/eclass/ghc-package.eclass
Gentoo

Diff of /eclass/ghc-package.eclass

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

Revision 1.15 Revision 1.16
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/ghc-package.eclass,v 1.15 2005/09/13 12:51:30 kosmikus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.16 2006/03/01 12:58:01 dcoutts Exp $
4# 4#
5# Author: Andres Loeh <kosmikus@gentoo.org> 5# Author: Andres Loeh <kosmikus@gentoo.org>
6# 6#
7# This eclass helps with the Glasgow Haskell Compiler's package 7# This eclass helps with the Glasgow Haskell Compiler's package
8# configuration utility. 8# configuration utility.
40 40
41# returns the version of ghc 41# returns the version of ghc
42_GHC_VERSION_CACHE="" 42_GHC_VERSION_CACHE=""
43ghc-version() { 43ghc-version() {
44 if [[ -z "${_GHC_VERSION_CACHE}" ]]; then 44 if [[ -z "${_GHC_VERSION_CACHE}" ]]; then
45 _GHC_VERSION_CACHE="$($(ghc-getghc) --version | sed 's:^.*version ::')" 45 _GHC_VERSION_CACHE="$($(ghc-getghc) --numeric-version)"
46 fi 46 fi
47 echo "${_GHC_VERSION_CACHE}" 47 echo "${_GHC_VERSION_CACHE}"
48} 48}
49 49
50# this function can be used to determine if ghc itself 50# this function can be used to determine if ghc itself

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.20