Refactor gcc.c, pulling out the reusable code
[ghc-hetmet.git] / rules / docbook.mk
index a06aa0f..922574e 100644 (file)
@@ -29,14 +29,20 @@ $(call all-target,$1,html_$1)
 
 html_$1 : $1/$2/index.html
 
+ifneq "$$(BINDIST)" "YES"
 $1/$2/index.html: $$($1_DOCBOOK_SOURCES)
        "$$(RM)" $$(RM_OPTS) -r $$(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
+
+INSTALL_HTML_DOC_DIRS += $1/$2
 else
 html_$1 :
        @echo "*** HTML documentation is disabled; BUILD_DOCBOOK_HTML = NO"
@@ -49,8 +55,12 @@ $(call all-target,$1,ps_$1)
 
 ps_$1 : $1/$2.ps
 
+ifneq "$$(BINDIST)" "YES"
 $1/$2.ps: $$($1_DOCBOOK_SOURCES)
        "$$(DBLATEX)" $$(DBLATEX_OPTS) $1/$2.xml --ps -o $$@
+endif
+
+INSTALL_DOCS += $1/$2.ps
 else
 ps_$1 :
        @echo "*** PS documentation is disabled; BUILD_DOCBOOK_PS = NO"
@@ -63,8 +73,12 @@ $(call all-target,$1,pdf_$1)
 .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 $$@
+endif
+
+INSTALL_DOCS += $1/$2.pdf
 else
 pdf_$1 :
        @echo "*** PDF documentation is disabled; BUILD_DOCBOOK_PDF = NO"