Commit 6f476448 authored by Ian Lynagh's avatar Ian Lynagh

Fix creation of library doc index, and put the library docs in bindists

parent 9c5b7a1e
......@@ -13,7 +13,6 @@
# ToDo List.
#
# * finish installation
# * create doc index and contents
# * Windows: should we have ghc-pkg-<version>?
# * should we be stripping things?
# * install libgmp.a, gmp.h
......@@ -590,6 +589,11 @@ libraries/base3-compat_dist-install_HC_OPTS += -XPackageImports
.PHONY: stage1_libs
stage1_libs : $(ALL_STAGE1_LIBS)
libraries/index.html: $(ALL_HADDOCK_FILES)
cd libraries && sh gen_contents_index --inplace
$(eval $(call all-target,library_doc_index,libraries/index.html))
INSTALL_LIBRARY_DOCS += libraries/*.html libraries/*.gif libraries/*.css libraries/*.js
# -----------------------------------------------------------------------------
# Bootstrapping libraries
......@@ -732,6 +736,9 @@ install_docs: $(INSTALL_HEADERS)
$(INSTALL_DOC) $(INSTALL_OPTS) $$i $(DESTDIR)$(docdir); \
done
$(INSTALL_DIR) $(INSTALL_OPTS) $(DESTDIR)$(docdir)/html; \
for i in $(INSTALL_LIBRARY_DOCS); do \
$(INSTALL_DOC) $(INSTALL_OPTS) $$i $(DESTDIR)$(docdir)/libraries/; \
done
for i in $(INSTALL_HTML_DOC_DIRS); do \
$(INSTALL_DIR) $(INSTALL_OPTS) $(DESTDIR)$(docdir)/html/`basename $$i`; \
$(INSTALL_DOC) $(INSTALL_OPTS) $$i/* $(DESTDIR)$(docdir)/html/`basename $$i`; \
......@@ -786,7 +793,9 @@ $(eval $(call bindist,.,\
$(INSTALL_LIBEXEC_SCRIPTS) \
$(INSTALL_BINS) \
$(INSTALL_DOCS) \
$(INSTALL_LIBRARY_DOCS) \
$(addsuffix /*,$(INSTALL_HTML_DOC_DIRS)) \
$(wildcard libraries/*/dist-install/doc/) \
$(filter-out extra-gcc-opts,$(INSTALL_LIBS)) \
$(filter-out %/project.mk,$(filter-out mk/config.mk,$(MAKEFILE_LIST))) \
mk/fix_install_names.sh \
......
......@@ -7,12 +7,9 @@ NAMES=
case $* in
--inplace)
HADDOCK=../utils/haddock/install-inplace/bin/haddock
HADDOCK_FILES=`ls -1 */dist/doc/html/*/*.haddock | sort`
if [ -d dph ]
then
HADDOCK_FILES="$HADDOCK_FILES `ls -1 dph/*/dist/doc/html/*/*.haddock | sort`"
fi
HADDOCK=../inplace/bin/haddock
HADDOCK_FILES=`ls -1 */dist-install/doc/html/*/*.haddock | sort`
HADDOCK_FILES="$HADDOCK_FILES `ls -1 dph/*/dist-install/doc/html/*/*.haddock | sort`"
;;
*)
HADDOCK=../../../../bin/haddock
......
......@@ -17,6 +17,7 @@ ifneq "$$($1_$2_DO_HADDOCK)" "NO"
ifeq "$$($$($1_PACKAGE)_HADDOCK_FILE)" ""
$$($1_PACKAGE)_HADDOCK_FILE = $1/$2/doc/html/$$($1_PACKAGE)/$$($1_PACKAGE).haddock
ALL_HADDOCK_FILES += $$($$($1_PACKAGE)_HADDOCK_FILE)
else
$$(error Already got a haddock file for $$($1_PACKAGE))
endif
......
......@@ -124,7 +124,7 @@ doInstall ghcpkg ghcpkgconf directory distDir myDestDir myPrefix myLibdir myDocd
idts' = idts { prefix = toPathTemplate myPrefix,
libdir = toPathTemplate myLibdir,
libsubdir = toPathTemplate "$pkgid",
docdir = toPathTemplate (myDocdir </> "$pkgid"),
docdir = toPathTemplate (myDocdir </> "$pkg"),
htmldir = toPathTemplate "$docdir" }
progs = withPrograms lbi
prog = ConfiguredProgram {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment