[commit: ghc] master: Fix construction of ALL_ALEX_OPTS and ALL_AS_OPTS (a1cef22)

David Waern waern at galois.com
Sun Mar 10 20:25:40 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/a1cef22a4e8f98d71f774118a3b4b2dff9febd85

>---------------------------------------------------------------

commit a1cef22a4e8f98d71f774118a3b4b2dff9febd85
Author: Max Bolingbroke <batterseapower at hotmail.com>
Date:   Sun Feb 3 18:05:25 2013 +0000

    Fix construction of ALL_ALEX_OPTS and ALL_AS_OPTS
    
    Signed-off-by: David Waern <david.waern at gmail.com>

>---------------------------------------------------------------

 aclocal.m4                | 11 ++++++++---
 mk/config.mk.in           |  9 ++++-----
 rules/distdir-opts.mk     |  2 +-
 rules/distdir-way-opts.mk |  2 +-
 4 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 69b40fc..e225030 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 7564834..1fa6c94 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 50cc05e..d855dde 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 0d5fdd7..17ac70c 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) \





More information about the ghc-commits mailing list