X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fdocbook.mk;h=ccc0fa47a7f13d8cf6e86232485f761a2a3651c3;hb=7720e1503ee9b6ea2b949f95287a32b8d3361bb0;hp=b25252c3d67daba2c0ba035fcf98db1d482c83c5;hpb=0ef6ba7b28187a4bf5309f9702eeaf53a281204b;p=ghc-hetmet.git diff --git a/rules/docbook.mk b/rules/docbook.mk index b25252c..ccc0fa4 100644 --- a/rules/docbook.mk +++ b/rules/docbook.mk @@ -22,40 +22,55 @@ $(call clean-target,$1,docbook,$1/$2 $1/$2.pdf $1/$2.ps) # empty "all_$1" target just in case we're not building docs at all $(call all-target,$1,) +.PHONY: html_$1 + ifeq "$$(BUILD_DOCBOOK_HTML)" "YES" $(call all-target,$1,html_$1) +INSTALL_HTML_DOC_DIRS += $1/$2 +endif -.PHONY: html_$1 html_$1 : $1/$2/index.html +ifneq "$$(BINDIST)" "YES" $1/$2/index.html: $$($1_DOCBOOK_SOURCES) - "$$(RM)" $$(RM_OPTS) -r $$(dir $$@) + "$$(RM)" $$(RM_OPTS_REC) $$(dir $$@) "$$(XSLTPROC)" --stringparam base.dir $$(dir $$@) \ --stringparam use.id.as.filename 1 \ --stringparam html.stylesheet fptools.css \ + --nonet \ $$(XSLTPROC_LABEL_OPTS) $$(XSLTPROC_OPTS) \ - $$(DIR_DOCBOOK_XSL)/html/chunk.xsl $1/$2.xml + $$(XSLTPROC_HTML_STYLESHEET) \ + $1/$2.xml cp mk/fptools.css $$(dir $$@) endif + +.PHONY: ps_$1 ifeq "$$(BUILD_DOCBOOK_PS)" "YES" $(call all-target,$1,ps_$1) +INSTALL_DOCS += $1/$2.ps +endif -.PHONY: ps_$1 ps_$1 : $1/$2.ps +ifneq "$$(BINDIST)" "YES" $1/$2.ps: $$($1_DOCBOOK_SOURCES) "$$(DBLATEX)" $$(DBLATEX_OPTS) $1/$2.xml --ps -o $$@ + [ -f $$@ ] endif ifeq "$$(BUILD_DOCBOOK_PDF)" "YES" $(call all-target,$1,pdf_$1) +INSTALL_DOCS += $1/$2.pdf +endif .PHONY: pdf_$1 pdf_$1 : $1/$2.pdf +ifneq "$$(BINDIST)" "YES" $1/$2.pdf: $$($1_DOCBOOK_SOURCES) "$$(DBLATEX)" $$(DBLATEX_OPTS) $1/$2.xml --pdf -o $$@ + [ -f $$@ ] endif endef