Don't build haddock if HADDOC_DOCS = NO, and disable HADDOC_DOCS if GhcWithInterprete...
authorMatthias Kilian <kili@outback.escape.de>
Sun, 20 Sep 2009 18:13:19 +0000 (18:13 +0000)
committerMatthias Kilian <kili@outback.escape.de>
Sun, 20 Sep 2009 18:13:19 +0000 (18:13 +0000)
Haddock uses TcRnDriver.tcRnGetInfo, which is only available if
GHCI is built. Set HADDOC_DOCS to NO if GhcWithInterpreter is NO,
and disable the haddock build if HADDOC_DOCS = NO.

ghc.mk
mk/config.mk.in

diff --git a/ghc.mk b/ghc.mk
index 8267dea..3f6b615 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -493,9 +493,11 @@ BUILD_DIRS += \
    $(GHC_GENAPPLY_DIR)
 endif
 
+ifneq "$(HADDOCK_DOCS)" "NO"
 BUILD_DIRS += \
    utils/haddock \
    utils/haddock/doc
+endif
 
 ifneq "$(CLEANING)" "YES"
 BUILD_DIRS += \
index 27682b7..f660fc0 100644 (file)
@@ -740,7 +740,7 @@ SRC_ALEX_OPTS               = -g
 HSTAGS = @HstagsCmd@
 
 # Should we build haddock docs?
-HADDOCK_DOCS = YES
+HADDOCK_DOCS = $(GhcWithInterpreter)
 # And HsColour the sources?
 ifeq "$(HSCOLOUR)" ""
 HSCOLOUR_SRCS = NO