Simon's big boxy-type commit
[ghc-hetmet.git] / Makefile
index f9e10be..88e14df 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -289,11 +289,28 @@ binary-dist::
        fi
 #
 # binary dist'ing the documentation.  
-# Which documentation to build/install is hardcoded below.
-#
+# The default documentation to build/install is given below; overrideable
+# via build.mk or the 'make' command-line.
+
+ifndef BINDIST_DOC_WAYS
 
-BINDIST_DOC_WAYS = html ps
-# BINDIST_DOC_WAYS =
+ifneq "$(XSLTPROC)" ""
+BINDIST_DOC_WAYS = html
+ifneq "$(FOP)" ""
+BINDIST_DOC_WAYS += ps pdf
+else
+ifneq "$(PDFXMLTEX)" ""
+BINDIST_DOC_WAYS += pdf
+endif
+ifneq "$(XMLTEX)" ""
+ifneq "$(DVIPS)" ""
+BINDIST_DOC_WAYS += ps
+endif # DVIPS
+endif # XMLTEX
+endif # FOP
+endif # XSLTPROC
+
+endif # BINDIST_DOC_WAYS
 
 binary-dist ::
 ifneq "$(DIR_DOCBOOK_XSL)" ""