[commit: ghc] master: Fix haddocking after the build system changes (77d1a44)

Ian Lynagh igloo at earth.li
Sat Mar 2 00:35:56 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/77d1a44aa82cd60fa66b6ad96b8a264157042ce4

>---------------------------------------------------------------

commit 77d1a44aa82cd60fa66b6ad96b8a264157042ce4
Author: Ian Lynagh <ian at well-typed.com>
Date:   Fri Mar 1 22:43:30 2013 +0000

    Fix haddocking after the build system changes

>---------------------------------------------------------------

 ghc.mk | 49 ++++++++++++++++++++++++++++---------------------
 1 file changed, 28 insertions(+), 21 deletions(-)

diff --git a/ghc.mk b/ghc.mk
index 319522a..b265733 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -511,6 +511,24 @@ ALL_STAGE1_LIBS += $(foreach lib,$(PACKAGES_STAGE1),$(libraries/$(lib)_dist-inst
 endif
 BOOT_LIBS = $(foreach lib,$(PACKAGES_STAGE0),$(libraries/$(lib)_dist-boot_v_LIB))
 
+# -----------------------------------------------
+# 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: inplace/bin/haddock$(exeext) $(ALL_HADDOCK_FILES)
+	cd libraries && sh gen_contents_index --intree
+ifeq "$(phase)" "final"
+$(eval $(call all-target,library_doc_index,libraries/dist-haddock/index.html))
+endif
+INSTALL_LIBRARY_DOCS += libraries/dist-haddock/*
+endif
+
 # ----------------------------------------
 # Special magic for the ghc-prim package
 
@@ -565,6 +583,9 @@ endif
 # -----------------------------------------------------------------------------
 # Include build instructions from all subdirs
 
+# These need to be in dependency order, as some of the rules refer to
+# variables defined by their dependencies
+
 ifneq "$(BINDIST)" "YES"
 BUILD_DIRS += \
    $(GHC_MKDIRHIER_DIR)
@@ -614,9 +635,7 @@ endif
 
 ifneq "$(CLEANING)" "YES"
 BUILD_DIRS += \
-   $(patsubst %, libraries/%, $(PACKAGES_STAGE1)) \
-   $(patsubst %, libraries/%, $(PACKAGES_STAGE2)) \
-   libraries/dph
+   $(patsubst %, libraries/%, $(PACKAGES_STAGE1))
 endif
 
 
@@ -651,6 +670,12 @@ BUILD_DIRS += \
    $(MAYBE_RUNGHC) \
    ghc
 
+ifneq "$(CLEANING)" "YES"
+BUILD_DIRS += \
+   $(patsubst %, libraries/%, $(PACKAGES_STAGE2)) \
+   libraries/dph
+endif
+
 ifneq "$(BINDIST)" "YES"
 ifneq "$(CrossCompiling)-$(phase)" "YES-final"
 BUILD_DIRS += \
@@ -686,24 +711,6 @@ $(foreach pkg,$(PACKAGES_STAGE1) $(PACKAGES_STAGE2),$(eval libraries/$(pkg)_dist
 # Add $(GhcBootLibHcOpts) to all stage0 package builds
 $(foreach pkg,$(PACKAGES_STAGE0),$(eval libraries/$(pkg)_dist-boot_HC_OPTS += $$(GhcBootLibHcOpts)))
 
-# -----------------------------------------------
-# 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: inplace/bin/haddock$(exeext) $(ALL_HADDOCK_FILES)
-	cd libraries && sh gen_contents_index --intree
-ifeq "$(phase)" "final"
-$(eval $(call all-target,library_doc_index,libraries/dist-haddock/index.html))
-endif
-INSTALL_LIBRARY_DOCS += libraries/dist-haddock/*
-endif
-
 # -----------------------------------------------------------------------------
 # Bootstrapping libraries
 





More information about the ghc-commits mailing list