Build system improvements
[ghc-hetmet.git] / rules / docbook.mk
index 8488de1..ebc3751 100644 (file)
@@ -25,10 +25,12 @@ $(call all-target,$1,)
 
 .PHONY: html_$1
 
+ifeq "$$(phase)" ""
 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
 
@@ -47,10 +49,12 @@ endif
 
 
 .PHONY: ps_$1
+ifeq "$$(phase)" ""
 ifeq "$$(BUILD_DOCBOOK_PS)" "YES"
 $(call all-target,$1,ps_$1)
 INSTALL_DOCS += $1/$2.ps
 endif
+endif
 
 ps_$1 : $1/$2.ps
 
@@ -60,10 +64,12 @@ $1/$2.ps: $$($1_DOCBOOK_SOURCES)
        [ -f $$@ ]
 endif
 
+ifeq "$$(phase)" ""
 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