summaryrefslogtreecommitdiff
path: root/rules/docbook.mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-05-08 00:06:03 +0000
committerIan Lynagh <igloo@earth.li>2009-05-08 00:06:03 +0000
commit1cce2f51656cfbd8c7933a914a4bd981792aa1e6 (patch)
tree0ff9578722dc8ce0a54bfc1c304cb18c4576c777 /rules/docbook.mk
parent78d34718d999143141b20ae5f23595efb86bd166 (diff)
downloadhaskell-1cce2f51656cfbd8c7933a914a4bd981792aa1e6.tar.gz
Handle deciding what docs to build better
Now we have variables for whether or not to build the docbook docs as HTML, as PS, and as PDF. The configure script output now matches what the build system will do (except it cannot take account of any mk/build.mk settings, of course).
Diffstat (limited to 'rules/docbook.mk')
-rw-r--r--rules/docbook.mk20
1 files changed, 17 insertions, 3 deletions
diff --git a/rules/docbook.mk b/rules/docbook.mk
index 196019eb1f..3eb5d94527 100644
--- a/rules/docbook.mk
+++ b/rules/docbook.mk
@@ -17,10 +17,10 @@ define docbook
# $1 = dir
# $2 = docname
-$(call clean-target,$1,docbook,$1/$2)
+$(call clean-target,$1,docbook,$1/$2 $1/$2.pdf $1/$2.ps)
-ifneq "$$(XSLTPROC)" ""
-$(call all-target,$1,$1/$2/index.html)
+ifeq "$$(BUILD_DOCBOOK_HTML)" "YES"
+$(call all-target,$1_html,$1/$2/index.html)
$1/$2/index.html: $$($1_DOCBOOK_SOURCES)
$$(RM) -r $$(dir $$@)
@@ -32,5 +32,19 @@ $1/$2/index.html: $$($1_DOCBOOK_SOURCES)
cp mk/fptools.css $$(dir $$@)
endif
+ifeq "$$(BUILD_DOCBOOK_PS)" "YES"
+$(call all-target,$1_ps,$1/$2.ps)
+
+$1/$2.ps: $$($1_DOCBOOK_SOURCES)
+ $$(DBLATEX) $$(DBLATEX_OPTS) $1/$2.xml --ps -o $$@
+endif
+
+ifeq "$$(BUILD_DOCBOOK_PDF)" "YES"
+$(call all-target,$1_pdf,$1/$2.pdf)
+
+$1/$2.pdf: $$($1_DOCBOOK_SOURCES)
+ $$(DBLATEX) $$(DBLATEX_OPTS) $1/$2.xml --pdf -o $$@
+endif
+
endef