1 # -----------------------------------------------------------------------------
3 # (c) 2009 The University of Glasgow
5 # This file is part of the GHC build system.
7 # To understand how the build system works and how to modify it, see
8 # http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
9 # http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
11 # -----------------------------------------------------------------------------
20 $(call clean-target,$1,docbook,$1/$2 $1/$2.pdf $1/$2.ps)
22 # empty "all_$1" target just in case we're not building docs at all
23 $(call all-target,$1,)
27 ifeq "$$(BUILD_DOCBOOK_HTML)" "YES"
28 $(call all-target,$1,html_$1)
30 html_$1 : $1/$2/index.html
32 ifneq "$$(BINDIST)" "YES"
33 $1/$2/index.html: $$($1_DOCBOOK_SOURCES)
34 "$$(RM)" $$(RM_OPTS) -r $$(dir $$@)
35 "$$(XSLTPROC)" --stringparam base.dir $$(dir $$@) \
36 --stringparam use.id.as.filename 1 \
37 --stringparam html.stylesheet fptools.css \
39 $$(XSLTPROC_LABEL_OPTS) $$(XSLTPROC_OPTS) \
40 $$(XSLTPROC_HTML_STYLESHEET) \
42 cp mk/fptools.css $$(dir $$@)
45 INSTALL_HTML_DOC_DIRS += $1/$2
48 @echo "*** HTML documentation is disabled; BUILD_DOCBOOK_HTML = NO"
53 ifeq "$$(BUILD_DOCBOOK_PS)" "YES"
54 $(call all-target,$1,ps_$1)
58 ifneq "$$(BINDIST)" "YES"
59 $1/$2.ps: $$($1_DOCBOOK_SOURCES)
60 "$$(DBLATEX)" $$(DBLATEX_OPTS) $1/$2.xml --ps -o $$@
63 INSTALL_DOCS += $1/$2.ps
66 @echo "*** PS documentation is disabled; BUILD_DOCBOOK_PS = NO"
70 ifeq "$$(BUILD_DOCBOOK_PDF)" "YES"
71 $(call all-target,$1,pdf_$1)
76 ifneq "$$(BINDIST)" "YES"
77 $1/$2.pdf: $$($1_DOCBOOK_SOURCES)
78 "$$(DBLATEX)" $$(DBLATEX_OPTS) $1/$2.xml --pdf -o $$@
81 INSTALL_DOCS += $1/$2.pdf
84 @echo "*** PDF documentation is disabled; BUILD_DOCBOOK_PDF = NO"