aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-09-28 01:42:35 +0000
committerIan Lynagh <igloo@earth.li>2008-09-28 01:42:35 +0000
commitc96ecfcc2d38165957227dea5bc43f28c3a512c9 (patch)
treed7d404416dbad8ca62bc7620faec8185df9d6eb7 /Makefile
parent10e47f35af686b7a2eaaf2b3422cf98d77734f1c (diff)
Fix building haddock when GhcProfiled=YES
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 75f61a37..2c77d49f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,19 @@
TOP=../..
+include $(TOP)/mk/boilerplate.mk
+
ENABLE_SHELL_WRAPPERS = YES
EXTRA_INPLACE_CONFIGURE_FLAGS += --flags=in-ghc-tree
EXTRA_STAGE2_CONFIGURE_FLAGS += --flags=in-ghc-tree
EXTRA_STAGE2_CONFIGURE_FLAGS += --datasubdir=.
+# If we are profiling GHC then we didn't bother to build the GHC API for
+# profiling, so we need to use profiling when building haddock
+ifeq "$(GhcProfiled)" "YES"
+EXTRA_STAGE2_CONFIGURE_FLAGS += --disable-library-for-ghci
+EXTRA_STAGE2_CONFIGURE_FLAGS += --disable-library-vanilla
+EXTRA_STAGE2_CONFIGURE_FLAGS += --enable-library-profiling
+EXTRA_STAGE2_CONFIGURE_FLAGS += --enable-executable-profiling
+endif
# Ideally we'd automatically find these from the .cabal file:
BINDIST_EXTRAS += html/haddock-DEBUG.css \
@@ -13,7 +23,6 @@ BINDIST_EXTRAS += html/haddock-DEBUG.css \
html/minus.gif \
html/plus.gif
-include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/cabal.mk
# bindist.mk isn't expecting a library to be in the same package as an