|Version 9 (modified by simonmar, 7 years ago) (diff)|
Building the documentation
The GHC build includes Haddock, and the Haddock documentation for libraries is built and installed by default.
You can disable Haddock documentation for your build by adding
HADDOCK_DOCS = NO
to your mk/build.mk.
It is also possible to process the libraries sources using HsColour, and for the Haddock documentation to include links to the HsColoured source code; in order to do this, just install HsColour and re-run ./configure. The configure script will tell you whether it found HsColour at the end.
To build just the Haddock docs for a given library, do this:
cd libraries/base make html stage=0 FAST=YES
The rest of the documentation, in particular the Users' Guide and Cabal documentation, are in DocBook XML format. In order to process the documentation into HTML or printable formats, you need appropriate tools installed. The configure script searches for the appropriate tools, and will tell you whether it found any.
To install the tools necessary for building the documentation, see Building/Preparation.
At the moment, we are not able to build documentation in PDF format due to tool flakiness. If you manage to find a way to process the documentation into readable PDF, please let us know!
The following make variables control the building of each type of documentation:
BUILD_DOCBOOK_HTML = YES/NO BUILD_DOCBOOK_PS = YES/NO BUILD_DOCBOOK_PDF = YES/NO
They are set to YES or NO in mk/config.mk by configure, depending on whether the necessary tools were detected on your system. You can override the automatic settings in your mk/build.mk file.
To build a document on its own, for example the Users Guide, do this:
cd docs/users_guide make html stage=0 FAST=YES
substitute 'html' for 'pdf' or 'ps' to build other types of documentation.
Documentation is installed by default by 'make install'.