ruby-changes:10802
From: nobu <ko1@a...>
Date: Tue, 17 Feb 2009 17:02:32 +0900 (JST)
Subject: [ruby-changes:10802] Ruby:r22370 (ruby_1_8): * configure.in (MAJOR, MINOR, TEENY): uses RUBY_VERSION_*.
nobu 2009-02-17 17:00:50 +0900 (Tue, 17 Feb 2009) New Revision: 22370 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22370 Log: * configure.in (MAJOR, MINOR, TEENY): uses RUBY_VERSION_*. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/configure.in Index: ruby_1_8/configure.in =================================================================== --- ruby_1_8/configure.in (revision 22369) +++ ruby_1_8/configure.in (revision 22370) @@ -44,20 +44,12 @@ GNU_LD=$rb_cv_prog_gnu_ld AC_SUBST(GNU_LD)]) -unset GREP_OPTIONS -rb_version=`grep RUBY_VERSION $srcdir/version.h` -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 +eval `sed -n 's/^#define RUBY_VERSION_\([A-Z][A-Z_0-9]*\) \([0-9][0-9]*\)/\1=\2/p' $srcdir/version.h` +for v in MAJOR MINOR TEENY; do + if eval "test \"\$$v\" = ''"; then + AC_MSG_ERROR(could not determine $v number from version.h) + fi +done AC_SUBST(MAJOR) AC_SUBST(MINOR) AC_SUBST(TEENY) Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 22369) +++ ruby_1_8/ChangeLog (revision 22370) @@ -1,3 +1,7 @@ +Tue Feb 17 17:00:49 2009 Nobuyoshi Nakada <nobu@r...> + + * configure.in (MAJOR, MINOR, TEENY): uses RUBY_VERSION_*. + Tue Feb 17 12:53:51 2009 Nobuyoshi Nakada <nobu@r...> * string.c (get_arg_pat): no second parameter. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/