Commit a1cef22a authored by batterseapower's avatar batterseapower Committed by David Waern

Fix construction of ALL_ALEX_OPTS and ALL_AS_OPTS

Signed-off-by: waern's avatarDavid Waern <david.waern@gmail.com>
parent 9f264421
......@@ -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)
......
......@@ -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?
......
......@@ -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)
......
......@@ -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) \
......
Markdown is supported
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