summaryrefslogtreecommitdiff
path: root/Dh_Haskell.sh
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2015-04-28 08:23:01 +0000
committerJoachim Breitner <mail@joachim-breitner.de>2015-04-28 08:23:01 +0000
commit90a7324227b74a36655a0bcf437328f7cc0da54b (patch)
tree8fc4746577f98a808d6a27155755aaa6d04c00ae /Dh_Haskell.sh
parent254d921322892651ad1decf1af708e264683ec12 (diff)
Use "eval" to allow quotes in DEB_SETUP_GHC_CONFIGURE_ARGS to have effect, assemble LDFLAGS more sanely
Diffstat (limited to 'Dh_Haskell.sh')
-rw-r--r--Dh_Haskell.sh19
1 files changed, 14 insertions, 5 deletions
diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index d23e072..3a54403 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -374,12 +374,21 @@ configure_recipe(){
ENABLE_PROFILING=`{ for i in ${DEB_PACKAGES}; do package_ext $i | grep prof; done; } | sort -u | sed 's/prof/--enable-library-profiling/'`
local GHC_OPTIONS
- for i in `dpkg-buildflags --get LDFLAGS`; do GHC_OPTIONS="$GHC_OPTIONS -optl$i"; done
+ for i in `dpkg-buildflags --get LDFLAGS`
+ do
+ GHC_OPTIONS="$GHC_OPTIONS --ghc-option=-optl$i"
+ done
- ${DEB_SETUP_BIN_NAME} configure "--${hc}" -v2 --package-db=/`hc_pkgdir ${hc}` \
- --prefix=/`hc_prefix ${hc}` --libdir=/`hc_libdir ${hc}` \
+ # DEB_SETUP_GHC_CONFIGURE_ARGS can contain multiple arguments with their own quoting,
+ # so run this through eval
+ eval run ${DEB_SETUP_BIN_NAME} \
+ configure "--${hc}" \
+ -v2 \
+ --package-db=/`hc_pkgdir ${hc}` \
+ --prefix=/`hc_prefix ${hc}` \
+ --libdir=/`hc_libdir ${hc}` \
--builddir=dist-${hc} \
- --ghc-options="${GHC_OPTIONS}" \
+ ${GHC_OPTIONS} \
--haddockdir=/`hc_docdir ${hc} ${CABAL_PACKAGE}-${CABAL_VERSION}` \
--datasubdir=${CABAL_PACKAGE}\
--htmldir=/`hc_htmldir ${hc} ${CABAL_PACKAGE}` \
@@ -395,7 +404,7 @@ configure_recipe(){
build_recipe(){
# local PS5=$PS4; PS4=" + build_recipe> "; set -x
hc=`packages_hc`
- ${DEB_SETUP_BIN_NAME} build --builddir=dist-${hc}
+ run ${DEB_SETUP_BIN_NAME} build --builddir=dist-${hc}
# PS4=$PS5
}