Fix haddocking
authorIan Lynagh <ian@well-typed.com>
Sat, 20 Apr 2013 15:21:29 +0000 (16:21 +0100)
committerIan Lynagh <ian@well-typed.com>
Sat, 20 Apr 2013 16:37:12 +0000 (17:37 +0100)
We weren't seting the _DO_HADDOCK variables early enough.

ghc.mk

diff --git a/ghc.mk b/ghc.mk
index 2890096..27062d6 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -500,6 +500,11 @@ endif
 # --------------------------------
 # Misc package-related settings
 
+# Run Haddock for the packages that will be installed. We need to handle
+# compiler specially due to the different dist directory name.
+$(foreach p,$(INSTALL_PACKAGES),$(eval $p_dist-install_DO_HADDOCK = YES))
+compiler_stage2_DO_HADDOCK = YES
+
 BOOT_PKG_CONSTRAINTS := \
     $(foreach d,$(PACKAGES_STAGE0),\
         $(foreach p,$(basename $(notdir $(wildcard libraries/$d/*.cabal))),\
@@ -733,11 +738,6 @@ endif
 # -----------------------------------------------
 # Haddock-related bits
 
-# Run Haddock for the packages that will be installed. We need to handle
-# compiler specially due to the different dist directory name.
-$(foreach p,$(INSTALL_PACKAGES),$(eval $p_dist-install_DO_HADDOCK = YES))
-compiler_stage2_DO_HADDOCK = YES
-
 # Build the Haddock contents and index
 ifeq "$(HADDOCK_DOCS)" "YES"
 libraries/dist-haddock/index.html: $(haddock_INPLACE) $(ALL_HADDOCK_FILES)