Commit 579b46fe authored by sof's avatar sof
Browse files

[project @ 2001-11-09 18:17:48 by sof]

* Moved CANON_HC_VERSION out of ghc/compiler/Makefile and into mk/config.mk.in
  (and renamed it as GhcCanonVersion).
* Have ghc/driver/Makefile use it; cheaper and more robust than the version
  testing it was already doing.
parent cd844a66
# -----------------------------------------------------------------------------
# $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
......@@ -108,19 +108,14 @@ DIRS += javaGen
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
......@@ -138,7 +133,7 @@ HS_SRCS += $(CONFIG_HS)
# 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=..
......@@ -25,15 +24,17 @@ PKGCONF_OPTS = "$(TARGETPLATFORM)" \
"$(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
......
......@@ -614,6 +614,8 @@ GhcVersion = @GhcVersion@
GhcMajVersion = @GhcMajVersion@
GhcMinVersion = @GhcMinVersion@
GhcPatchLevel = @GhcPatchLevel@
# Canonicalised ghc version number, used for easy (integer) version comparisons.
GhcCanonVersion = $(GhcMajVersion)$(GhcMinVersion)$(GhcPatchLevel)
HBC = @HBC@
NHC = @NHC@
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment