Prevent haddock docs being built when HADDOCK_DOCS=NO
[ghc-hetmet.git] / rules / haddock.mk
index 74cb207..8c5f00a 100644 (file)
@@ -1,3 +1,15 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+#      http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+#      http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
 
 define haddock  # args: $1 = dir,  $2 = distdir, $3 = way
 
@@ -9,7 +21,9 @@ else
 $$(error Already got a haddock file for $$($1_PACKAGE))
 endif
 
+ifeq "HADDOCK_DOCS" "YES"
 $(call all-target,$1_$2_haddock,$$($$($1_PACKAGE)_HADDOCK_FILE))
+endif
 
 $$($1_PACKAGE)_HADDOCK_DEPS = $$(foreach n,$$($1_$2_DEP_NAMES),$$($$n_HADDOCK_FILE))