[commit: ghc] wip/nfs-locking: cabal-install-2.x can new-build (#386) (6e8b0af)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:36:24 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/6e8b0afa1be2fd735784f7e1213a79694b512aa7/ghc
>---------------------------------------------------------------
commit 6e8b0afa1be2fd735784f7e1213a79694b512aa7
Author: Oleg Grenrus <oleg.grenrus at iki.fi>
Date: Wed Aug 2 13:33:09 2017 +0300
cabal-install-2.x can new-build (#386)
>---------------------------------------------------------------
6e8b0afa1be2fd735784f7e1213a79694b512aa7
.gitignore | 1 +
build.cabal.sh | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 2e3581b..4b026f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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/
diff --git a/build.cabal.sh b/build.cabal.sh
index 973cd3e..0dd9731 100755
--- a/build.cabal.sh
+++ b/build.cabal.sh
@@ -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/.." \
"$@"
More information about the ghc-commits
mailing list