projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
'make html' in a library builds the Haddock docs
[ghc-hetmet.git]
/
rules
/
haddock.mk
diff --git
a/rules/haddock.mk
b/rules/haddock.mk
index
371d5e1
..
6269612
100644
(file)
--- a/
rules/haddock.mk
+++ b/
rules/haddock.mk
@@
-11,7
+11,7
@@
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
-define haddock # args: $1 = dir, $2 = distdir, $3 = way
+define haddock # args: $1 = dir, $2 = distdir
ifneq "$$($1_$2_DO_HADDOCK)" "NO"
ifneq "$$($1_$2_DO_HADDOCK)" "NO"
@@
-24,9
+24,12
@@
endif
haddock: $$($$($1_PACKAGE)_HADDOCK_FILE)
ifeq "$$(HADDOCK_DOCS)" "YES"
haddock: $$($$($1_PACKAGE)_HADDOCK_FILE)
ifeq "$$(HADDOCK_DOCS)" "YES"
-$(call all-target,$1_$2_haddock,$$($$($1_PACKAGE)_HADDOCK_FILE))
+$(call all-target,$1_$2_haddock,html_$1)
endif
endif
+.PHONY: html_$1
+html_$1 : $$($$($1_PACKAGE)_HADDOCK_FILE)
+
$$($1_PACKAGE)_HADDOCK_DEPS = $$(foreach n,$$($1_$2_DEP_NAMES),$$($$n_HADDOCK_FILE))
ifeq "$$(HSCOLOUR_SRCS)" "YES"
$$($1_PACKAGE)_HADDOCK_DEPS = $$(foreach n,$$($1_$2_DEP_NAMES),$$($$n_HADDOCK_FILE))
ifeq "$$(HSCOLOUR_SRCS)" "YES"
@@
-34,8
+37,8
@@
$1_$2_HADDOCK_FLAGS += --hyperlink-source
endif
$$($$($1_PACKAGE)_HADDOCK_FILE) : $$(MKDIRHIER) $$(INPLACE_BIN)/haddock$$(exeext) $$(GHC_CABAL_INPLACE) $$($1_$2_HS_SRCS) $$($$($1_PACKAGE)_HADDOCK_DEPS)
endif
$$($$($1_PACKAGE)_HADDOCK_FILE) : $$(MKDIRHIER) $$(INPLACE_BIN)/haddock$$(exeext) $$(GHC_CABAL_INPLACE) $$($1_$2_HS_SRCS) $$($$($1_PACKAGE)_HADDOCK_DEPS)
- $$(MKDIRHIER) $$(dir $$@)
- $$(GHC_CABAL_INPLACE) haddock $2 $1 --with-haddock=$$(TOP)/$$(INPLACE_BIN)/haddock --with-ghc=$$(TOP)/$$(INPLACE_BIN)/ghc-stage2 $$($1_$2_HADDOCK_FLAGS) $$($1_$2_HADDOCK_OPTS)
+ "$$(MKDIRHIER)" $$(dir $$@)
+ "$$(GHC_CABAL_INPLACE)" haddock $2 $1 --with-haddock=$$(TOP)/$$(INPLACE_BIN)/haddock --with-ghc=$$(TOP)/$$(INPLACE_BIN)/ghc-stage2 $$($1_$2_HADDOCK_FLAGS) $$($1_$2_HADDOCK_OPTS)
# Make the haddocking depend on the library .a file, to ensure
# that we wait until the library is fully build before we haddock it
# Make the haddocking depend on the library .a file, to ensure
# that we wait until the library is fully build before we haddock it