rules/haddock: Add EXTRA_HADDOCK_OPTS flag
authorBen Gamari <bgamari.foss@gmail.com>
Thu, 17 Dec 2015 11:15:27 +0000 (12:15 +0100)
committerBen Gamari <ben@smart-cactus.org>
Thu, 17 Dec 2015 11:54:32 +0000 (12:54 +0100)
Allowing one to pass the new `--hyperlinked-source` option to generate
pretty marked-up sources for the core libraries.

Test Plan: Try it

Reviewers: hvr, austin

Reviewed By: austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1643

rules/haddock.mk

index f6978a7..3d3a83c 100644 (file)
@@ -64,13 +64,14 @@ endif
          --hoogle \
          --title="$$($1_PACKAGE)-$$($1_$2_VERSION)$$(if $$(strip $$($1_$2_SYNOPSIS)),: $$(strip $$($1_$2_SYNOPSIS)),)" \
          --prologue="$1/$2/haddock-prologue.txt" \
-    --optghc="-D__HADDOCK_VERSION__=$$(HADDOCK_VERSION_STRING)" \
+         --optghc="-D__HADDOCK_VERSION__=$$(HADDOCK_VERSION_STRING)" \
          $$(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_$$(HADDOCK_WAY)_ALL_HC_OPTS),--optghc=$$(opt)) \
          $$($1_$2_HADDOCK_FLAGS) $$($1_$2_HADDOCK_OPTS) \
          $$($1_$2_HS_SRCS) \
          $$($1_$2_EXTRA_HADDOCK_SRCS) \
+         $$(EXTRA_HADDOCK_OPTS) \
          +RTS -t"$1/$2/haddock.t" --machine-readable
 
 # --no-tmp-comp-dir above is important: it saves a few minutes in a