Commit 7568d39f authored by Simon Marlow's avatar Simon Marlow
Browse files

clean up the Haddock rules a bit

parent 1168daad
......@@ -260,12 +260,48 @@ haskell-librariesx.dvi : sigplan_haskell-libraries.dvi
# -----------------------------------------------------------------------------
# Haddock-generated library docs
HADDOCK = /64playpen/simonmar/testing/inplace/bin/haddock
# The results of auto-generating the library docs are in the
# repository already, so you only need to re-generate if you are
# changing anything.
GHC_BUILD = /home/simonmar/builds/testing
LIB_PKG_DIR = $(GHC_BUILD)/libraries/haskell2010
# To generate the library docs, we need to run Haddock against the
# modules of the haskell2010 package. The package is here:
#
# http://darcs.haskell.org/packages/haskell2010
#
# I generated the documentation using a GHC build, but you could
# probably do it using just the package sources, as long as you have
# GHC and all the package documentation installed.
#
# Basically the plan is to run Haddock in the same way as for
# generating the HTML documentation, except that we
#
# * replace --html with --latex
# * Add --latex-style=NONE to prevent Haddock dumping its haddock.sty
# * Add --odir=$(HADDOCK_DIR)
#
# So to get started, in a GHC build, you could run
#
# $ cd libraries/haskell2010
# $ make html stage=0 FAST=YES
#
# And grab the Haddock command line that the build system emits.
#
# The following rules will probably need a lot of manual modification,
# sorry about that.
# Set this to Haddock (version 2.8 or later with the LaTeX back-end)
HADDOCK = /home/simonmar/builds/testing/inplace/bin/haddock
HADDOCK_GHC_OPTS = --optghc=-package-name --optghc=haskell2010-1.0.0.0 --optghc=-hide-all-packages --optghc=-i --optghc=-i$(GHC_BUILD)/libraries/haskell2010/. --optghc=-i$(GHC_BUILD)/libraries/haskell2010/dist-install/build --optghc=-i$(GHC_BUILD)/libraries/haskell2010/dist-install/build/autogen --optghc=-i$(GHC_BUILD)/Libraries/haskell2010/dist-install/build --optghc=-i$(GHC_BUILD)/Libraries/haskell2010/dist-install/build/autogen --optghc=-i$(GHC_BUILD)/Libraries/haskell2010/. --optghc=-optP-include --optghc=-optP$(GHC_BUILD)/libraries/haskell2010/dist-install/build/autogen/cabal_macros.h --optghc=-package --optghc=array-0.3.0.0 --optghc=-package --optghc=base-4.3.0.0 --optghc=-package-name --optghc=haskell2010 --optghc=-XPackageImports --optghc=-XCPP --optghc=-no-user-package-conf --optghc=-rtsopts --optghc=-O --optghc=-fasm --optghc=-dcore-lint --optghc=-fno-warn-deprecated-flags --optghc=-odir --optghc=libraries/haskell2010/dist-install/build --optghc=-hidir --optghc=$(GHC_BUILD)/libraries/haskell2010/dist-install/build --optghc=-stubdir --optghc=$(GHC_BUILD)/libraries/haskell2010/dist-install/build --optghc=-hisuf --optghc=hi --optghc=-osuf --optghc=o --optghc=-hcsuf --optghc=hc
# Set this to the location of the libraries in a GHC build
LIBDIR = /home/simonmar/builds/testing/libraries
haddock :
$(HADDOCK) --odir=$(HADDOCK_ODIR) --no-tmp-comp-dir --latex --title="haskell2010-1.0.0.0: Compatibility with Haskell 2010" --read-interface=../ghc-prim,$(GHC_BUILD)/libraries/ghc-prim/dist-install/doc/html/ghc-prim/ghc-prim.haddock --read-interface=../array-0.3.0.0,$(GHC_BUILD)/libraries/array/dist-install/doc/html/array/array.haddock --read-interface=../base-4.3.0.0,$(GHC_BUILD)/libraries/base/dist-install/doc/html/base/base.haddock $(HADDOCK_GHC_OPTS) $(patsubst %, $(LIB_PKG_DIR)/%, $(addsuffix .hs, $(subst .,/,$(LIB_MODULES))))
$(HADDOCK) --odir=$(HADDOCK_ODIR) --no-tmp-comp-dir \
--latex --latex-style=NONE \
--title="haskell2010-1.0.0.0: Compatibility with Haskell 2010" \
--read-interface=../ghc-prim,$(LIBDIR)/ghc-prim/dist-install/doc/html/ghc-prim/ghc-prim.haddock \
--read-interface=../array-0.3.0.0,$(LIBDIR)/array/dist-install/doc/html/array/array.haddock \
--read-interface=../base-4.3.0.0,$(LIBDIR)/base/dist-install/doc/html/base/base.haddock \
--optghc=-package-name --optghc=haskell2010-1.0.0.0 --optghc=-hide-all-packages --optghc=-i --optghc=-i$(LIBDIR)/haskell2010/. --optghc=-i$(LIBDIR)/haskell2010/dist-install/build --optghc=-i$(LIBDIR)/haskell2010/dist-install/build/autogen --optghc=-i$(LIBDIR)/haskell2010/dist-install/build --optghc=-i$(LIBDIR)/haskell2010/dist-install/build/autogen --optghc=-i$(LIBDIR)/haskell2010/. --optghc=-optP-include --optghc=-optP$(LIBDIR)/haskell2010/dist-install/build/autogen/cabal_macros.h --optghc=-package --optghc=array-0.3.0.0 --optghc=-package --optghc=base-4.3.0.0 --optghc=-package-name --optghc=haskell2010 --optghc=-XPackageImports --optghc=-XCPP --optghc=-no-user-package-conf --optghc=-rtsopts --optghc=-O --optghc=-fasm --optghc=-dcore-lint --optghc=-fno-warn-deprecated-flags --optghc=-odir --optghc=libraries/haskell2010/dist-install/build --optghc=-hidir --optghc=$(LIBDIR)/haskell2010/dist-install/build --optghc=-stubdir --optghc=$(LIBDIR)/haskell2010/dist-install/build --optghc=-hisuf --optghc=hi --optghc=-osuf --optghc=o --optghc=-hcsuf --optghc=hc \
$(patsubst %, $(LIBDIR)/haskell2010/%, $(addsuffix .hs, $(subst .,/,$(LIB_MODULES))))
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