diff options
-rw-r--r-- | aclocal.m4 | 11 | ||||
-rw-r--r-- | mk/config.mk.in | 9 | ||||
-rw-r--r-- | rules/distdir-opts.mk | 2 | ||||
-rw-r--r-- | rules/distdir-way-opts.mk | 2 |
4 files changed, 14 insertions, 10 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 69b40fccf1..e225030ddd 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -863,7 +863,7 @@ AC_SUBST(HappyVersion) dnl dnl Check for Alex and version. If we're building GHC, then we need -dnl at least Alex version 2.0.1. +dnl at least Alex version 2.1.1. dnl AC_DEFUN([FPTOOLS_ALEX], [ @@ -879,12 +879,17 @@ else fi; changequote([, ])dnl ]) +FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-ge],[3.0], + [Alex3=YES],[Alex3=NO]) if test ! -f compiler/cmm/CmmLex.hs || test ! -f compiler/parser/Lexer.hs then FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[2.1.0], [AC_MSG_ERROR([Alex version 2.1.0 or later is required to compile GHC.])])[] - FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-ge],[3.0], - [Alex3=YES],[Alex3=NO]) +fi +if test ! -f utils/haddock/src/Haddock/Lex.hs +then + FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[3.0], + [AC_MSG_ERROR([Alex version 3.0 or later is required to compile Haddock.])])[] fi AlexVersion=$fptools_cv_alex_version; AC_SUBST(AlexVersion) diff --git a/mk/config.mk.in b/mk/config.mk.in index 75648341ef..1fa6c947e3 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -733,14 +733,13 @@ ALEX = @AlexCmd@ ALEX_VERSION = @AlexVersion@ Alex3 = @Alex3@ # -# Options to pass to Happy when we're going to compile the output with GHC +# Options to pass to Alex when we're going to compile the output with GHC # +SRC_ALEX_OPTS = -g ifeq "$(Alex3)" "YES" -# We aren't using the Unicode support in Alex 3.0 yet, in fact we do our own +# The compiler isn't using the Unicode support in Alex 3.0 yet, in fact we do our own # Unicode handling, so diable Alex's. -SRC_ALEX_OPTS = -g --latin1 -else -SRC_ALEX_OPTS = -g +compiler_ALEX_OPTS = --latin1 endif # Should we build haddock docs? diff --git a/rules/distdir-opts.mk b/rules/distdir-opts.mk index 50cc05edf3..d855ddead9 100644 --- a/rules/distdir-opts.mk +++ b/rules/distdir-opts.mk @@ -96,7 +96,7 @@ $1_$2_ALL_HSC2HS_OPTS = \ $1_$2_ALL_ALEX_OPTS = \ $$(CONF_ALEX_OPTS) \ - $$(SRC_ALEX_OPTS) + $$(SRC_ALEX_OPTS) \ $$($1_ALEX_OPTS) \ $$($1_$2_ALEX_OPTS) \ $$(EXTRA_ALEX_OPTS) diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk index 0d5fdd715d..17ac70c045 100644 --- a/rules/distdir-way-opts.mk +++ b/rules/distdir-way-opts.mk @@ -150,7 +150,7 @@ $1_$2_$3_GHC_CC_OPTS = \ $1_$2_$3_ALL_AS_OPTS = \ $$(CONF_AS_OPTS) \ - $$(SRC_AS_OPTS) + $$(SRC_AS_OPTS) \ $$(WAY_$3_AS_OPTS) \ $$($1_AS_OPTS) \ $$($1_$2_AS_OPTS) \ |