X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fhaddock.mk;h=00084433a338a05e7e8d0227338b3d8cc7f3c291;hb=4738e101938db94cbe8444bc42f59d29b1b815c6;hp=9303d16eb4dde34cdb50158c9ac3863bcbfd607b;hpb=f3c529f27f03934902efaba0fdbaff92ee098d3e;p=ghc-hetmet.git diff --git a/rules/haddock.mk b/rules/haddock.mk index 9303d16..0008443 100644 --- a/rules/haddock.mk +++ b/rules/haddock.mk @@ -31,10 +31,10 @@ 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)) +$$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_DEPS = $$(foreach n,$$($1_$2_DEPS),$$($$n_HADDOCK_FILE) $$($$n_dist-install_v_LIB)) ifeq "$$(HSCOLOUR_SRCS)" "YES" -$1_$2_HADDOCK_FLAGS += --source-module=src/%{MODULE/./-}.html --source-entity=src/%{MODULE/./-}.html#%{NAME} +$1_$2_HADDOCK_FLAGS += --source-module=src/%{MODULE/./-}.html --source-entity=src/%{MODULE/./-}.html\#%{NAME} endif ifneq "$$(BINDIST)" "YES" @@ -44,16 +44,24 @@ ifeq "$$(HSCOLOUR_SRCS)" "YES" endif "$$(TOP)/$$(INPLACE_BIN)/haddock" \ --odir="$1/$2/doc/html/$$($1_PACKAGE)" \ + --no-tmp-comp-dir \ --dump-interface=$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE) \ --html \ --title="$$($1_PACKAGE)-$$($1_$2_VERSION)$$(if $$(strip $$($1_$2_SYNOPSIS)),: $$(strip $$($1_$2_SYNOPSIS)),)" \ --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)_HADDOCK_FILE))) \ $$(foreach opt,$$($1_$2_v_ALL_HC_OPTS),--optghc=$$(opt)) \ $$($1_$2_HADDOCK_FLAGS) $$($1_$2_HADDOCK_OPTS) \ $$($1_$2_HS_SRCS) \ $$($1_$2_EXTRA_HADDOCK_SRCS) +# --no-tmp-comp-dir above is important: it saves a few minutes in a +# validate. This flag lets Haddock use the pre-compiled object files +# for the package rather than rebuilding the modules of the package in +# a temporary directory. Haddock needs to build the package when it +# uses the Template Haskell or Annotations extensions, for example. + # Make the haddocking depend on the library .a file, to ensure # that we wait until the library is fully build before we haddock it $$($$($1_PACKAGE)_HADDOCK_FILE) : $$($1_$2_v_LIB)