Commit 6e8b0afa authored by Oleg Grenrus's avatar Oleg Grenrus Committed by Andrey Mokhov

cabal-install-2.x can new-build (#386)

parent e918ec1d
......@@ -11,6 +11,7 @@ cabal.sandbox.config
# build.cabal-new.sh specific
/dist-newstyle/
.ghc.environment.*
# build.stack.sh and build.stack.bat specific
/.stack-work/
......
......@@ -42,14 +42,14 @@ CABVERSTR=$("$CABAL" --numeric-version)
CABVER=( ${CABVERSTR//./ } )
if [ "${CABVER[0]}" -eq 1 -a "${CABVER[1]}" -ge 24 ]; then
if [ "${CABVER[0]}" -eq 2 -o "${CABVER[0]}" -eq 1 -a "${CABVER[1]}" -ge 24 ]; then
# New enough cabal version detected, so
# let's use the superior 'cabal new-build' mode
# there's no 'cabal new-run' yet, but it's easy to emulate
"$CABAL" new-build --disable-profiling --disable-documentation -j exe:hadrian
PKGVER="$(awk '/^version:/ { print $2 }' hadrian.cabal)"
"./dist-newstyle/build/hadrian-${PKGVER}/build/hadrian/hadrian" \
$(find ./dist-newstyle -type f -name hadrian | head -n 1) \
--lint \
--directory "$absoluteRoot/.." \
"$@"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment