List Info

Thread: make sure version numbers can be determined




make sure version numbers can be determined
user name
2008-03-16 18:48:55
Hi,

Someone reported me an installation problem, while
installing MacRuby.

After a long investigation, it turned out to be because the
reporter
was using a customized GREP_OPTIONS environment variable,
set to the
"--color=always" value.

With that value, configure cannot determine MAJOR, MINOR and
TEENY
because the output of `grep RUBY_VERSION version.h' is
different
(probably because it contains ANSI sequences).

But configure doesn't complain about that, and leave you
with
incomplete installation paths. I think configure should fail
if one of
these numbers could not be determined. Following is an
attempt to do
that, but I'm not an autotools expert, maybe there is a
better way to
do it.

Laurent

Index: configure.in
============================================================
=======
--- configure.in	(revision 87)
+++ configure.in	(working copy)
 -67,6
+67,15 
 MAJOR=`expr "$rb_version" : '#define
RUBY_VERSION
"([0-9][0-9]*).[0-9][0-9]*.[0-9][0-9]*"'`
 MINOR=`expr "$rb_version" : '#define
RUBY_VERSION
"[0-9][0-9]*.([0-9][0-9]*).[0-9][0-9]*"'`
 TEENY=`expr "$rb_version" : '#define
RUBY_VERSION
"[0-9][0-9]*.[0-9][0-9]*.([0-9][0-9]*)"'`
+if test "$MAJOR" = ""; then
+  AC_MSG_ERROR(could not determine MAJOR number from
version.h)
+fi
+if test "$MINOR" = ""; then
+  AC_MSG_ERROR(could not determine MINOR number from
version.h)
+fi
+if test "$TEENY" = ""; then
+  AC_MSG_ERROR(could not determine TEENY number from
version.h)
+fi
 AC_SUBST(MAJOR)
 AC_SUBST(MINOR)
 AC_SUBST(TEENY)


Re: make sure version numbers can be determined
country flaguser name
Japan
2008-03-17 02:53:20
Hi,

At Mon, 17 Mar 2008 08:48:55 +0900,
Laurent Sansonetti wrote in [ruby-core:15918]:
> After a long investigation, it turned out to be because
the reporter
> was using a customized GREP_OPTIONS environment
variable, set to the
> "--color=always" value.

Thank you, committed with unsetting GREP_OPTIONS.

-- 
Nobu Nakada


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )