From ff5a62e76398cbeca28ca5ab0f8c359593b9a457 Mon Sep 17 00:00:00 2001 From: rrt Date: Tue, 3 Apr 2001 12:58:54 +0000 Subject: [PATCH] [project @ 2001-04-03 12:58:54 by rrt] Make ghc-inplace work on Windows by adding FPTOOLS_TOP_ABS_UNIX to be always the UNIX-style version of the path (for the Cygwin tools), and make CC_OPTS be set even if there is no C_PROG, so that -mno-cygwin and -mwin32 are always passed on Windows (and must be filtered out where not needed, e.g. in lndir.c). --- mk/config.mk.in | 1 + mk/target.mk | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mk/config.mk.in b/mk/config.mk.in index 3bffb6a..84034a7 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -402,6 +402,7 @@ endif # FPTOOLS_TOP: the top of the fptools hierarchy, absolute path. FPTOOLS_TOP_ABS = @hardtop@ +FPTOOLS_TOP_ABS_UNIX = @hardtop@ ifeq "$(TARGETPLATFORM)" "i386-unknown-cygwin32" FPTOOLS_TOP_ABS = $(subst \,/,$(shell cygpath -w @hardtop@)) endif diff --git a/mk/target.mk b/mk/target.mk index 6970096..e3d6c80 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -311,13 +311,13 @@ endif #---------------------------------------- # C programs -ifneq "$(C_PROG)" "" -all :: $(C_PROG) - ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -CC_OPTS += -mno-cygwin +CC_OPTS += -mno-cygwin -mwin32 endif +ifneq "$(C_PROG)" "" +all :: $(C_PROG) + $(C_PROG) :: $(C_OBJS) $(CC) -o $@ $(CC_OPTS) $(LD_OPTS) $(C_OBJS) $(LIBS) endif -- 1.7.10.4