Permalink
Browse files

CabalTranslation.hs: minor semantic change of PKGBUILD_HASKELL_ENABLE…

…_PROFILING

In order to enable building of profiling libraries, set the
environment variable PKGBUILD_HASKELL_ENABLE_PROFILING to any
non-empty string, i.e. "1", "0", "yes", or "no". To disable support,
undefine PKGBUILD_HASKELL_ENABLE_PROFILING (or set it to an empty
string).

These semantics feel slightly more robust than expecting the user to
specify a specific value, a number even, to turn this feature on. By
default, that environment variable is undefined, so profiling
libraries are off by default.

For those who are running chroot builds -- i.e. by means of the
makeworld script shipped in HABS --, please note that the shell
environment of the caller will not be exported into the chroot build
environment! As of now, it seems like the only way to enable
profiling in chroot builds is to add an assignment of the variable
PKGBUILD_HASKELL_ENABLE_PROFILING to /etc/makepkg.conf (in the
chroot environment).
  • Loading branch information...
1 parent e573a07 commit 788fb68b6ec34c032952dfb63ef0ae369599c693 @peti peti committed Apr 19, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 Distribution/ArchLinux/CabalTranslation.hs
@@ -205,7 +205,7 @@ stubPackageLibrary _ = emptyPkgBuild {
"http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
, arch_build =
[ "cd ${srcdir}/${_hkgname}-${pkgver}"
- , "runhaskell Setup configure -O $([[ $PKGBUILD_HASKELL_ENABLE_PROFILING == 1 ]] && echo \"-p\") --enable-split-objs --enable-shared \\"
+ , "runhaskell Setup configure -O ${PKGBUILD_HASKELL_ENABLE_PROFILING:+-p } --enable-split-objs --enable-shared \\"
, " --prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\\$compiler/site-local/\\$pkgid"
, "runhaskell Setup build"
, "runhaskell Setup haddock"

0 comments on commit 788fb68

Please sign in to comment.