X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fdocbook.mk;h=5a7bfdfd8320ad147b5d67090e8db1a4a9888f98;hb=fe58dd2f091f5a4a0e83a5ec6da643a6711e3aed;hp=bbcf41c808be6af91492cf9892ec0163daff7cc0;hpb=dfb53739ae18f3c5e0efd32c5ea03748f73a9dc5;p=ghc-hetmet.git diff --git a/rules/docbook.mk b/rules/docbook.mk index bbcf41c..5a7bfdf 100644 --- a/rules/docbook.mk +++ b/rules/docbook.mk @@ -14,6 +14,8 @@ # Build docbook docs define docbook +$(call trace, docbook($1,$2)) +$(call profStart, docbook($1,$2)) # $1 = dir # $2 = docname @@ -24,13 +26,18 @@ $(call all-target,$1,) .PHONY: html_$1 +ifeq "$$(phase)" "final" ifeq "$$(BUILD_DOCBOOK_HTML)" "YES" $(call all-target,$1,html_$1) +INSTALL_HTML_DOC_DIRS += $1/$2 +endif +endif 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 \ @@ -39,39 +46,41 @@ $1/$2/index.html: $$($1_DOCBOOK_SOURCES) $$(XSLTPROC_HTML_STYLESHEET) \ $1/$2.xml cp mk/fptools.css $$(dir $$@) -else -html_$1 : - @echo "*** HTML documentation is disabled; BUILD_DOCBOOK_HTML = NO" - @exit 1 endif + .PHONY: ps_$1 +ifeq "$$(phase)" "final" ifeq "$$(BUILD_DOCBOOK_PS)" "YES" $(call all-target,$1,ps_$1) +INSTALL_DOCS += $1/$2.ps +endif +endif ps_$1 : $1/$2.ps +ifneq "$$(BINDIST)" "YES" $1/$2.ps: $$($1_DOCBOOK_SOURCES) "$$(DBLATEX)" $$(DBLATEX_OPTS) $1/$2.xml --ps -o $$@ -else -ps_$1 : - @echo "*** PS documentation is disabled; BUILD_DOCBOOK_PS = NO" - @exit 1 + [ -f $$@ ] endif +ifeq "$$(phase)" "final" ifeq "$$(BUILD_DOCBOOK_PDF)" "YES" $(call all-target,$1,pdf_$1) +INSTALL_DOCS += $1/$2.pdf +endif +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 $$@ -else -pdf_$1 : - @echo "*** PDF documentation is disabled; BUILD_DOCBOOK_PDF = NO" - @exit 1 + [ -f $$@ ] endif +$(call profEnd, docbook($1,$2)) endef