From c96ecfcc2d38165957227dea5bc43f28c3a512c9 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sun, 28 Sep 2008 01:42:35 +0000 Subject: Fix building haddock when GhcProfiled=YES --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile') 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 -- cgit v1.2.3