# -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.172 2001/07/09 13:21:09 sewardj Exp $
+# $Id: Makefile,v 1.177 2001/07/21 19:08:44 sof Exp $
TOP = ..
include $(TOP)/mk/boilerplate.mk
ifeq "$(BootingFromHc)" "YES"
# HC files are always from a self-booted compiler
bootstrapped = YES
+compiling_with_4xx=NO
else
bootstrapped = $(shell if (test $(CANON_HC_VERSION) -ge $(ProjectVersionInt)0); then echo YES; else echo NO; fi)
+compiling_with_4xx = $(shell if (test $(CANON_HC_VERSION) -lt 5000); then echo YES; else echo NO; fi)
endif
# Only include GHCi if we're bootstrapping with at least version 411
# Big Fudge to get around inherent problem that Makefile setup
# has got with 'mkdependC'.
#
-SRC_MKDEPENDC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt) -I$(GHC_INCLUDES)
+SRC_MKDEPENDC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt) -I$(GHC_INCLUDE_DIR)
# -----------------------------------------------------------------------------
# Haskell compilations
# The latest GHC version doesn't have a -K option yet, and it doesn't
# seem to be necessary anymore for the modules below.
-ifeq "$(bootstrapped)" "NO"
+ifeq "$(compiling_with_4xx)" "YES"
rename/ParseIface_HC_OPTS += -K2m
parser/Parser_HC_OPTS += -K2m
endif
chmod 755 $@
ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
@$(RM) $@.bat
- echo "@"$(subst /,\\,$(FPTOOLS_TOP_ABS)/ghc/compiler/$(HS_PROG)) "-B$(FPTOOLS_TOP_ABS) %*" >$@.bat
+ echo "@"$(subst /,\\,$(FPTOOLS_TOP_ABS)/ghc/compiler/$(HS_PROG)) "-B$(FPTOOLS_TOP_ABS) %1 %2 %3 %4 %5 %6 %7 %8 %9" >$@.bat
chmod 755 $@.bat
endif