From be96a4fa9b79d57a6be20b5b6bb4d8f51317e2e3 Mon Sep 17 00:00:00 2001 From: "wolfgang.thaller@gmx.net" Date: Tue, 27 Mar 2007 21:01:22 +0000 Subject: [PATCH] Make GHC main program depend on the libHSghc_dyn when GhcBuildDylibs==YES When building a dynamic GHC, we obviously want to build the dynamic library libHSghc_dyn.[so|dylib] before building the compiler executable. MERGE TO STABLE --- compiler/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/compiler/Makefile b/compiler/Makefile index aac594d..9ef59c4 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -891,7 +891,17 @@ all :: $(GHC_PROG) # configuration. Yeuch... maybe one day this will all be done more cleanly. STAMP_PKG_CONF = $(GHC_DRIVER_DIR)/stamp-pkg-conf-$(PACKAGE) -$(GHC_PROG) : libHS$(PACKAGE)$(_way).a main/Main.hs +ifeq "$(GhcBuildDylibs)" "YES" +ifeq "$(darwin_TARGET_OS)" "1" +GhcLibraryName=libHS$(PACKAGE)$(_way)_dyn.dylib +else +GhcLibraryName=libHS$(PACKAGE)$(_way)_dyn.so +endif +else +GhcLibraryName=libHS$(PACKAGE)$(_way).a +endif + +$(GHC_PROG) : $(GhcLibraryName) main/Main.hs $(RM) package.conf.inplace $(RM) $(STAMP_PKG_CONF) $(MAKE) $(STAMP_PKG_CONF) -- 1.7.10.4