Fix the haddocking build system rules when dynamic is the default way
authorIan Lynagh <ian@well-typed.com>
Thu, 25 Oct 2012 17:06:15 +0000 (18:06 +0100)
committerIan Lynagh <ian@well-typed.com>
Thu, 25 Oct 2012 17:06:15 +0000 (18:06 +0100)
ghc.mk
rules/haddock.mk

diff --git a/ghc.mk b/ghc.mk
index 3f8d971..e7903b4 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -187,8 +187,10 @@ $(foreach way,$(ALL_WAYS),\
 
 ifeq "$(DYNAMIC_BY_DEFAULT)" "YES"
 GHCI_WAY = dyn
+HADDOCK_WAY = dyn
 else
 GHCI_WAY = v
+HADDOCK_WAY = v
 endif
 
 # -----------------------------------------------------------------------------
index b5fc63f..4dabe3c 100644 (file)
@@ -33,7 +33,7 @@ endif
 .PHONY: html_$1
 html_$1 : $$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE)
 
-$$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_DEPS = $$(foreach n,$$($1_$2_DEPS),$$($$n_HADDOCK_FILE) $$($$n_dist-install_v_LIB))
+$$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_DEPS = $$(foreach n,$$($1_$2_DEPS),$$($$n_HADDOCK_FILE) $$($$n_dist-install_$$(HADDOCK_WAY)_LIB))
 
 ifeq "$$(HSCOLOUR_SRCS)" "YES"
 $1_$2_HADDOCK_FLAGS += --source-module=src/%{MODULE/./-}.html --source-entity=src/%{MODULE/./-}.html\#%{NAME}
@@ -54,7 +54,7 @@ endif
          --prologue="$1/$2/haddock-prologue.txt" \
          $$(foreach mod,$$($1_$2_HIDDEN_MODULES),--hide=$$(mod)) \
          $$(foreach pkg,$$($1_$2_DEPS),$$(if $$($$(pkg)_HADDOCK_FILE),--read-interface=../$$(pkg)$$(comma)../$$(pkg)/src/%{MODULE/./-}.html\#%{NAME}$$(comma)$$($$(pkg)_HADDOCK_FILE))) \
-         $$(foreach opt,$$($1_$2_v_ALL_HC_OPTS),--optghc=$$(opt)) \
+         $$(foreach opt,$$($1_$2_$$(HADDOCK_WAY)_ALL_HC_OPTS),--optghc=$$(opt)) \
          $$($1_$2_HADDOCK_FLAGS) $$($1_$2_HADDOCK_OPTS) \
          $$($1_$2_HS_SRCS) \
          $$($1_$2_EXTRA_HADDOCK_SRCS) \
@@ -68,7 +68,7 @@ endif
 
 # Make the haddocking depend on the library .a file, to ensure
 # that we wait until the library is fully built before we haddock it
-$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE) : $$($1_$2_v_LIB)
+$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE) : $$($1_$2_$$(HADDOCK_WAY)_LIB)
 endif
 
 endif