diff options
author | Duncan Coutts <dcoutts@gentoo.org> | 2005-12-05 12:24:53 +0000 |
---|---|---|
committer | Duncan Coutts <dcoutts@gentoo.org> | 2005-12-05 12:24:53 +0000 |
commit | 7c34c94753865e1d51f7c2a162eea237ffbe9f76 (patch) | |
tree | e9d58a384cd46abef27b8d3c04db649a03ee88a1 /eclass | |
parent | Mistaken commit missed the picdl patch (was working on bug 65624, which this ... (diff) | |
download | gentoo-2-7c34c94753865e1d51f7c2a162eea237ffbe9f76.tar.gz gentoo-2-7c34c94753865e1d51f7c2a162eea237ffbe9f76.tar.bz2 gentoo-2-7c34c94753865e1d51f7c2a162eea237ffbe9f76.zip |
When doing profiling, enable profiling for libs as well as executables.
Cope with packages that do not register any libs, eg cabalised ebuilds that are
just straight programs (like c2hs).
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/haskell-cabal.eclass | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass index 0645913980c5..ccd8926f6fd4 100644 --- a/eclass/haskell-cabal.eclass +++ b/eclass/haskell-cabal.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.1 2005/09/13 12:53:34 kosmikus Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.2 2005/12/05 12:24:53 dcoutts Exp $ # # Original authors: Andres Loeh <kosmikus@gentoo.org> # Duncan Coutts <dcoutts@gentoo.org> @@ -115,7 +115,8 @@ cabal-haddock() { cabal-configure() { if [[ -n "${CABAL_USE_PROFILE}" ]] && use profile; then - cabalconf="${cabalconf} --enable-executable-profiling" + cabalconf="${cabalconf} --enable-executable-profiling"; + cabalconf="${cabalconf} --enable-library-profiling" fi ./setup configure \ @@ -152,8 +153,15 @@ cabal-pkg() { # This does not actually register since we're using /usr/bin/true instead # of ghc-pkg. So it just leaves the .installed-pkg-config and we can # register that ourselves (if it exists). + local result + local err + sed -i 's:ghc-pkg:/usr/bin/true:' .setup-config - ./setup register || die "setup register failed" + result="$(./setup register 2>&1)" + err="$?" + if ! echo ${result} | grep -q "no library to register"; then + $(exit "${err}") || die "setup register failed" + fi if [[ -f .installed-pkg-config ]]; then ghc-setup-pkg .installed-pkg-config ghc-install-pkg |