Build system fix for building a profiling GHC
authorIan Lynagh <ian@well-typed.com>
Tue, 16 Oct 2012 00:25:45 +0000 (01:25 +0100)
committerIan Lynagh <ian@well-typed.com>
Tue, 16 Oct 2012 00:25:45 +0000 (01:25 +0100)
ghc.mk

diff --git a/ghc.mk b/ghc.mk
index 2c64b02..aa700a6 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -677,6 +677,9 @@ endif
 # BUILD_DIRS_EXTRA needs to come after BUILD_DIRS, because stuff in
 # libraries/dph/ghc.mk refers to stuff defined earlier, in particular
 # things like $(libraries/dph/dph-base_dist-install_GHCI_LIB)
+ifeq "$(GhcProfiled)" "YES"
+BUILD_DIRS_EXTRA := $(filter-out libraries/dph,$(BUILD_DIRS_EXTRA))
+endif
 include $(patsubst %, %/ghc.mk, $(BUILD_DIRS) $(BUILD_DIRS_EXTRA))
 
 # A useful pseudo-target (must be after the include above, because it needs