bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: build: be robust to missing flex


From: Stefano Lattarini
Subject: Re: RFC: build: be robust to missing flex
Date: Tue, 27 Mar 2012 15:36:29 +0200

Hi Akim.

On 03/27/2012 03:21 PM, Akim Demaille wrote:
> I have pushed the following in next, to see what Hydra
> thinks about it (the bison-next build does not have
> flex available, so it's a perfect place to try this),
> but the build does not start.
> 
> This patch addresses two different issues:
> - actually lex does not suffice, we want flex, so use missing
> - if flex is not available, we cannot compile calc++ at all
>   (since the compilation of the examples is completely user
>   side).
> 
> To be applied soon.
> 
> From 7998f53250d62f332a95eb195efdbea4d164ebee Mon Sep 17 00:00:00 2001
> From: Akim Demaille <address@hidden>
> Date: Tue, 27 Mar 2012 08:22:49 +0200
> Subject: [PATCH] build: be robust to missing flex.
> 
> * configure.ac: We need flex to build bison, lex does not suffice,
> so use "missing flex" as back-up
> (HAVE_FLEX): New AM conditional.
> * examples/calc++/local.mk: Cannot work at all without Flex.
> ---
>  configure.ac             |    9 +++++++++
>  examples/calc++/local.mk |    4 +++-
>  2 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 622da5d..c998d58 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -110,6 +110,14 @@ AC_SUBST([YACC_LIBRARY])
>  
>  # Checks for programs.
>  AC_PROG_LEX
> +if `$LEX --version` 2>/dev/null | grep flex; then
>
Spurious command substitution here?

Also, grepping "$LEX --version" output is not a good way to determine
whether $LEX is actually flex; on my Debian box:

  $ flex --version # Good.
  flex 2.5.35
  $ readlink /usr/bin/lex
  flex
  $ lex --version # Ouch!
  lex 2.5.35

(Yes, I agree this is total breakage on flex's part).

Regards,
  Stefano



reply via email to

[Prev in Thread] Current Thread [Next in Thread]