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 ...@@ -11,6 +11,7 @@ cabal.sandbox.config
# build.cabal-new.sh specific # build.cabal-new.sh specific
/dist-newstyle/ /dist-newstyle/
.ghc.environment.*
# build.stack.sh and build.stack.bat specific # build.stack.sh and build.stack.bat specific
/.stack-work/ /.stack-work/
......
...@@ -42,14 +42,14 @@ CABVERSTR=$("$CABAL" --numeric-version) ...@@ -42,14 +42,14 @@ CABVERSTR=$("$CABAL" --numeric-version)
CABVER=( ${CABVERSTR//./ } ) 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 # New enough cabal version detected, so
# let's use the superior 'cabal new-build' mode # let's use the superior 'cabal new-build' mode
# there's no 'cabal new-run' yet, but it's easy to emulate # there's no 'cabal new-run' yet, but it's easy to emulate
"$CABAL" new-build --disable-profiling --disable-documentation -j exe:hadrian "$CABAL" new-build --disable-profiling --disable-documentation -j exe:hadrian
PKGVER="$(awk '/^version:/ { print $2 }' hadrian.cabal)" 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 \ --lint \
--directory "$absoluteRoot/.." \ --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