summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-01-08 14:43:46 +0000
committerIan Lynagh <igloo@earth.li>2012-01-08 14:43:46 +0000
commit4c49eb512499255fe7de0e6cfc08ed138957d583 (patch)
tree8c10a4a5cc9f4c6b96386697be6a88636a3291e6 /ghc.mk
parentc2a840ed2a439391c1a0e62f62a5c714422d4672 (diff)
downloadhaskell-4c49eb512499255fe7de0e6cfc08ed138957d583.tar.gz
Generate the haddock contents/index pages in a dist-haddock subdirectory
This is tidier, and makes it easier to clean and install them correctly
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk16
1 files changed, 8 insertions, 8 deletions
diff --git a/ghc.mk b/ghc.mk
index 3805bbe8ef..0bd3d8d57e 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -666,17 +666,12 @@ $(foreach p,$(PACKAGES_STAGE0),$(eval libraries/$p_dist-boot_DO_HADDOCK = NO))
# Build the Haddock contents and index
ifeq "$(HADDOCK_DOCS)" "YES"
-libraries/index.html: inplace/bin/haddock$(exeext) $(ALL_HADDOCK_FILES)
+libraries/dist-haddock/index.html: inplace/bin/haddock$(exeext) $(ALL_HADDOCK_FILES)
cd libraries && sh gen_contents_index --inplace
ifeq "$(phase)" "final"
-$(eval $(call all-target,library_doc_index,libraries/index.html))
+$(eval $(call all-target,library_doc_index,libraries/dist-haddock/index.html))
endif
-INSTALL_LIBRARY_DOCS += libraries/*.html libraries/*.gif libraries/*.css libraries/*.js
-CLEAN_FILES += $(wildcard libraries/doc-index* \
- libraries/haddock*.css \
- libraries/haddock*.js \
- libraries/index*.html \
- libraries/*.gif)
+INSTALL_LIBRARY_DOCS += libraries/dist-haddock/*
endif
# -----------------------------------------------------------------------------
@@ -1165,6 +1160,11 @@ $(foreach lib,$(PACKAGES_STAGE1) $(PACKAGES_STAGE2),\
$(eval $(call clean-target,libraries/$(lib),dist-install,libraries/$(lib)/dist-install)))
endif
+clean : clean_haddock_index
+.PHONY: clean_haddock_index
+clean_haddock_index:
+ $(call removeTrees,libraries/dist-haddock)
+
clean : clean_bindistprep
.PHONY: clean_bindistprep
clean_bindistprep: