summaryrefslogtreecommitdiff
path: root/rules/docbook.mk
diff options
context:
space:
mode:
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