grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Peter Cheung <mcheung63@hotmail.com>,
	grub-devel@gnu.org, help-grub@gnu.org
Subject: Re: flex version
Date: Sun, 15 Nov 2015 09:26:11 +0300	[thread overview]
Message-ID: <56482583.9050908@gmail.com> (raw)
In-Reply-To: <BLU436-SMTP79119ED68DBE5E0870412DB5100@phx.gbl>

[-- Attachment #1: Type: text/plain, Size: 458 bytes --]

14.11.2015 19:22, Peter Cheung пишет:
> hi
>     my flex in mac is installed using macports.
>
> $flex --version
> flex 2.5.35 Apple(flex-31)
>
> And the line in configure fail
>
> version=`$LEX --version | $AWK '{ split($NF,x,"."); print x[1]*10000+x[2]*100+x[3]; }’`
>
> Better to change it to:
>
> version=`$LEX --version | sed 's/flex //'|sed 's/ .*//'| $AWK '{ split($NF,x,"."); print x[1]*10000+x[2]*100+x[3]; }’`
>

Does attached patch help?

[-- Attachment #2: awk-macports.patch --]
[-- Type: text/x-patch, Size: 992 bytes --]

From: Andrei Borzenkov <arvidjaar@gmail.com>
Subject: [PATCH] configure: fix macports flex version detection

Macports add extra information after version itself:

$flex --version
flex 2.5.35 Apple(flex-31)

We require at least felx 2.5.35 so do not need to care about prehistoric
"flex version n.n.n"; just use second field always.

Reported by Peter Cheung <mcheung63@hotmail.com>

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 9e8a606..3300545 100644
--- a/configure.ac
+++ b/configure.ac
@@ -315,7 +315,7 @@ AC_PROG_LN_S
 if test "x$LEX" = "x:"; then
   AC_MSG_ERROR([flex is not found])
 else
-  version=`$LEX --version | $AWK '{ split($NF,x,"."); print x[[1]]*10000+x[[2]]*100+x[[3]]; }'`
+  version=`$LEX --version | $AWK '{ split($2,x,"."); print x[[1]]*10000+x[[2]]*100+x[[3]]; }'`
   if test -n "$version" -a "$version" -ge 20535; then
     :
   else
-- 
tg: (7994077..) u/flex-macports (depends on: master)

       reply	other threads:[~2015-11-16  6:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BLU436-SMTP79119ED68DBE5E0870412DB5100@phx.gbl>
2015-11-15  6:26 ` Andrei Borzenkov [this message]
2015-11-15  7:57   ` flex version Peter Cheung
2015-11-15  8:00   ` Peter Cheung
2015-11-27 11:11   ` Vladimir 'φ-coder/phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56482583.9050908@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=help-grub@gnu.org \
    --cc=mcheung63@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).