# -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.200 2001/11/09 17:39:45 sof Exp $
+# $Id: Makefile,v 1.201 2001/11/09 18:17:48 sof Exp $
TOP = ..
include $(TOP)/mk/boilerplate.mk
SRC_HC_OPTS += -DJAVA
endif
-#
-# Canonicalized GHC version number for easy version comparisons.
-#
-CANON_HC_VERSION=$(GhcMajVersion)$(GhcMinVersion)$(GhcPatchLevel)
-
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)
-ghc_502_at_least = $(shell if (test $(CANON_HC_VERSION) -ge 5020); then echo YES; else echo NO; fi)
+bootstrapped = $(shell if (test $(GhcCanonVersion) -ge $(ProjectVersionInt)0); then echo YES; else echo NO; fi)
+compiling_with_4xx = $(shell if (test $(GhcCanonVersion) -lt 5000); then echo YES; else echo NO; fi)
+ghc_502_at_least = $(shell if (test $(GhcCanonVersion) -ge 5020); then echo YES; else echo NO; fi)
endif
# Only include GHCi if we're bootstrapping with at least version 411
# Enable code that assumes a MSDOSish subshell. See mk/config.mk.in
# for explanatory comment as to what this does.
ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
-ghc_501_at_least = $(shell if (test $(CANON_HC_VERSION) -ge 5010); then echo YES; else echo NO; fi)
+ghc_501_at_least = $(shell if (test $(GhcVanonVersion) -ge 5010); then echo YES; else echo NO; fi)
# -----------------------------------------------
# GHCi calls the C procedure 'rawSystem'; but alas GHC 4.08
#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.68 2001/08/04 06:09:24 ken Exp $
#
TOP=..
"$(GHC_UTILS_DIR)" \
"$(GHC_INCLUDE_DIR)"
-ghc_407_at_least = $(shell expr "$(GhcVersion)" \>= 4.07)
-ifeq "$(ghc_407_at_least)" "1"
+SRC_HC_OPTS += -fglasgow-exts -cpp
+
+ghc_407_at_least = $(shell if (test $(GhcCanonVersion) -ge 4070); then echo YES; else echo NO; fi)
+
+ifeq "$(ghc_407_at_least)" "YES"
+SRC_HC_OPTS += -package concurrent -package text
ifneq "$(mingw32_TARGET_OS)" "1"
-SRC_HC_OPTS += -fglasgow-exts -cpp -package concurrent -package posix -package text
-else
-SRC_HC_OPTS += -fglasgow-exts -cpp -package concurrent -package text
+SRC_HC_OPTS += -package posix
endif
else
-SRC_HC_OPTS += -fglasgow-exts -cpp -syslib concurrent -syslib posix -syslib misc
+SRC_HC_OPTS += -syslib concurrent -syslib posix -syslib misc
endif
SRC_HC_OPTS += -DWANT_PRETTY
GhcMajVersion = @GhcMajVersion@
GhcMinVersion = @GhcMinVersion@
GhcPatchLevel = @GhcPatchLevel@
+# Canonicalised ghc version number, used for easy (integer) version comparisons.
+GhcCanonVersion = $(GhcMajVersion)$(GhcMinVersion)$(GhcPatchLevel)
HBC = @HBC@
NHC = @NHC@