Add a header to all build system files:
[ghc-hetmet.git] / rules / docbook.mk
1 # -----------------------------------------------------------------------------
2 #
3 # (c) 2009 The University of Glasgow
4 #
5 # This file is part of the GHC build system.
6 #
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
10 #
11 # -----------------------------------------------------------------------------
12
13
14 # Build docbook docs
15
16 define docbook
17 # $1 = dir
18 # $2 = docname
19
20 $(call clean-target,$1,docbook,$1/$2)
21
22 ifneq "$$(XSLTPROC)" ""
23 $(call all-target,$1,$1/$2/index.html)
24
25 $1/$2/index.html: $$($1_DOCBOOK_SOURCES)
26         $$(RM) -r $$(dir $$@)
27         $$(XSLTPROC) --stringparam base.dir $$(dir $$@) \
28                      --stringparam use.id.as.filename 1 \
29                      --stringparam html.stylesheet fptools.css \
30                      $$(XSLTPROC_LABEL_OPTS) $$(XSLTPROC_OPTS) \
31                      $$(DIR_DOCBOOK_XSL)/html/chunk.xsl $1/$2.xml
32         cp mk/fptools.css $$(dir $$@)
33 endif
34
35 endef
36