1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* configure.in (MAJOR, MINOR, TEENY): uses RUBY_VERSION_*.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-02-17 08:00:50 +00:00
parent b249fb0bad
commit 8fd2e12607
2 changed files with 10 additions and 14 deletions

View file

@ -1,3 +1,7 @@
Tue Feb 17 17:00:49 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (MAJOR, MINOR, TEENY): uses RUBY_VERSION_*.
Tue Feb 17 12:53:51 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* string.c (get_arg_pat): no second parameter.

View file

@ -44,20 +44,12 @@ fi
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)