Commit 61ef1764 authored by Simon Marlow's avatar Simon Marlow

make it so that 'make html', 'make pdf', and 'make ps' work for docs

parent 1396b545
......@@ -21,7 +21,7 @@ default :
.NOTPARALLEL:
# all comes first, we want it to be the default target
STD_TARGETS = all clean distclean maintainer_clean install
STD_TARGETS = all clean distclean maintainer_clean install html ps pdf
# The + tells make that we're recursively invoking make, otherwise 'make -j2'
# goes wrong.
......
......@@ -20,7 +20,10 @@ define docbook
$(call clean-target,$1,docbook,$1/$2 $1/$2.pdf $1/$2.ps)
ifeq "$$(BUILD_DOCBOOK_HTML)" "YES"
$(call all-target,$1_html,$1/$2/index.html)
$(call all-target,$1,html_$1)
.PHONY: html_$1
html_$1 : $1/$2/index.html
$1/$2/index.html: $$($1_DOCBOOK_SOURCES)
$$(RM) -r $$(dir $$@)
......@@ -33,14 +36,20 @@ $1/$2/index.html: $$($1_DOCBOOK_SOURCES)
endif
ifeq "$$(BUILD_DOCBOOK_PS)" "YES"
$(call all-target,$1_ps,$1/$2.ps)
$(call all-target,$1,ps_$1)
.PHONY: ps_$1
ps_$1 : $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)
$(call all-target,$1,pdf_$1)
.PHONY: pdf_$1
pdf_$1 : $1/$2.pdf
$1/$2.pdf: $$($1_DOCBOOK_SOURCES)
$$(DBLATEX) $$(DBLATEX_OPTS) $1/$2.xml --pdf -o $$@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment