summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/tree.mk2
-rwxr-xr-xvalidate19
2 files changed, 17 insertions, 4 deletions
diff --git a/mk/tree.mk b/mk/tree.mk
index 8273d6766a..db14cf4127 100644
--- a/mk/tree.mk
+++ b/mk/tree.mk
@@ -52,7 +52,7 @@ INPLACE_PERL = $(INPLACE)/perl
#
################################################################################
-BIN_DIST_INST_SUBDIR = "install dir"
+BIN_DIST_INST_SUBDIR = "install dir"
BIN_DIST_INST_DIR = bindisttest/$(BIN_DIST_INST_SUBDIR)
################################################################################
diff --git a/validate b/validate
index 901d5419ae..6f0405d0c1 100755
--- a/validate
+++ b/validate
@@ -105,6 +105,18 @@ if [ $speed != "FAST" ]; then
$make binary-dist-prep
$make test_bindist TEST_PREP=YES
+ # This is a hack to make
+ # HADDOCK_DOCS = NO
+ # work when validating.
+ if grep -q "^HADDOCK_DOCS[ ]*=[ ]*NO[ ]*$" mk/validate.mk
+ then
+ unset WITH_HADDOCK
+ DO_HADDOCK=NO
+ else
+ WITH_HADDOCK=--with-haddock="$thisdir/$bindistdir/bin/haddock"
+ DO_HADDOCK=YES
+ fi
+
#
# Install the mtl package into the bindist, because it is used by some
# tests. It isn't essential that we do this (the failing tests will
@@ -112,12 +124,13 @@ if [ $speed != "FAST" ]; then
# coverage, and also verify that we can install a package into the
# bindist with Cabal.
#
- bindistdir="bindisttest/install dir"
+ bindistdir="bindisttest/install dir"
cd libraries/mtl
"$thisdir/$bindistdir/bin/ghc" --make Setup
- ./Setup configure --with-ghc="$thisdir/$bindistdir/bin/ghc" --with-haddock="$thisdir/$bindistdir/bin/haddock" --global --builddir=dist-bindist --prefix="$thisdir/$bindistdir"
+
+ ./Setup configure --with-ghc="$thisdir/$bindistdir/bin/ghc" ${WITH_HADDOCK+"$WITH_HADDOCK"} --global --builddir=dist-bindist --prefix="$thisdir/$bindistdir"
./Setup build --builddir=dist-bindist
- ./Setup haddock --builddir=dist-bindist
+ [ "$DO_HADDOCK" = "YES" ] && ./Setup haddock --builddir=dist-bindist
./Setup install --builddir=dist-bindist
./Setup clean --builddir=dist-bindist
rm -f Setup Setup.exe Setup.hi Setup.o