diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-03-01 22:43:30 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-03-01 22:56:01 +0000 |
commit | 77d1a44aa82cd60fa66b6ad96b8a264157042ce4 (patch) | |
tree | 68745fa334b44c901ed7b6702006f7fccaa35983 /ghc.mk | |
parent | dd9da49ceda5bd0d6c860604ace0ca9829199fe5 (diff) | |
download | haskell-77d1a44aa82cd60fa66b6ad96b8a264157042ce4.tar.gz |
Fix haddocking after the build system changes
Diffstat (limited to 'ghc.mk')
-rw-r--r-- | ghc.mk | 49 |
1 files changed, 28 insertions, 21 deletions
@@ -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 |