From: rrt Date: Fri, 22 Jun 2001 13:31:29 +0000 (+0000) Subject: [project @ 2001-06-22 13:31:29 by rrt] X-Git-Tag: Approximately_9120_patches~1736 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c9ed624be9c92be63178bded7ebabffd8136e9a6;p=ghc-hetmet.git [project @ 2001-06-22 13:31:29 by rrt] Add machinery to copy system.c to main/ from lib/std/cbits/ when building GHC on Windows with GHC<5.01, so that the new implementation of system can be used rather than the old. --- diff --git a/ghc/compiler/Makefile b/ghc/compiler/Makefile index b975dfd..9dcc7d0 100644 --- a/ghc/compiler/Makefile +++ b/ghc/compiler/Makefile @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $Id: Makefile,v 1.160 2001/06/15 15:20:20 simonpj Exp $ +# $Id: Makefile,v 1.161 2001/06/22 13:31:29 rrt Exp $ TOP = .. include $(TOP)/mk/boilerplate.mk @@ -114,6 +114,15 @@ endif # for explanatory comment as to what this does. ifeq "$(MinimalUnixDeps)" "YES" SRC_HC_OPTS += -DMINIMAL_UNIX_DEPS +ghc_501_at_least = $(shell expr "$(GhcVersion)" \> 5.00) +ifneq "$(ghc_501_at_least)" "1" +boot :: + $(CP) ../lib/std/cbits/system.c main +C_SRCS += main/system.c +SRC_CC_OPTS += -I$(GHC_LIB_DIR)/std/cbits +SRC_MKDEPENDC_OPTS += -I$(GHC_LIB_DIR)/std/cbits +HS_OBJS += main/system.o +endif endif HS_SRCS := $(foreach dir,$(DIRS),$(wildcard $(dir)/*.lhs) $(wildcard $(dir)/*.hs)) @@ -130,10 +139,14 @@ ifeq "$(BootingFromHc)" "YES" HCS += rename/ParseIface.hc parser/Parser.hc main/ParsePkgConf.hc endif -HS_OBJS = \ +HS_OBJS = \ $(patsubst %.hc, %.o, $(HCS)) \ parser/hschooks.o +ifneq "$(ghc_501_at_least)" "1" +HS_OBJS += main/system.o +endif + DESTDIR = $(INSTALL_LIBRARY_DIR_GHC) #