[commit: ghc] master: Fix the haddocking build system rules when dynamic is the default way (f3115bd)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/f3115bdda03288960d28541562ce3fc8d9b623b8

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

commit f3115bdda03288960d28541562ce3fc8d9b623b8
Author: Ian Lynagh <[email protected]>
Date:   Thu Oct 25 18:06:15 2012 +0100

    Fix the haddocking build system rules when dynamic is the default way

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

 ghc.mk           |    2 ++
 rules/haddock.mk |    6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ghc.mk b/ghc.mk
index 3f8d971..e7903b4 100644
--- 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
 
 # -----------------------------------------------------------------------------
diff --git a/rules/haddock.mk b/rules/haddock.mk
index b5fc63f..4dabe3c 100644
--- a/rules/haddock.mk
+++ b/rules/haddock.mk
@@ -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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.