ruby-changes:41425
From: nobu <ko1@a...>
Date: Mon, 11 Jan 2016 09:50:31 +0900 (JST)
Subject: [ruby-changes:41425] nobu:r53498 (trunk): configure.in: check API version
nobu 2016-01-11 09:50:51 +0900 (Mon, 11 Jan 2016) New Revision: 53498 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53498 Log: configure.in: check API version * configure.in: check if the API version number is consistent with the program version number. Modified files: trunk/ChangeLog trunk/configure.in Index: configure.in =================================================================== --- configure.in (revision 53497) +++ configure.in (revision 53498) @@ -224,6 +224,7 @@ fi https://github.com/ruby/ruby/blob/trunk/configure.in#L224 GNU_LD=$rb_cv_prog_gnu_ld AC_SUBST(GNU_LD)]) +eval `sed -n 's/^#define RUBY_API_VERSION_\([A-Z][A-Z_0-9]*\) \([0-9][0-9]*\)/API_\1=\2/p' $srcdir/include/ruby/version.h` RUBY_PROGRAM_VERSION=`sed -n 's/^#define RUBY_VERSION "\(.*\)"/\1/p' $srcdir/version.h` MAJOR=`echo $RUBY_PROGRAM_VERSION | cut -d. -f1` MINOR=`echo $RUBY_PROGRAM_VERSION | cut -d. -f2` @@ -233,6 +234,9 @@ for v in MAJOR MINOR TEENY; do https://github.com/ruby/ruby/blob/trunk/configure.in#L234 AC_MSG_ERROR(could not determine $v number from version.h) fi done +AS_IF([test "$MAJOR.$MINOR" != "$API_MAJOR.$API_MINOR"], [ + AC_MSG_ERROR([API version $API_MAJOR.$API_MINOR differs from program version $MAJOR.$MINOR]) +]) AC_SUBST(MAJOR) AC_SUBST(MINOR) AC_SUBST(TEENY) Index: ChangeLog =================================================================== --- ChangeLog (revision 53497) +++ ChangeLog (revision 53498) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Jan 11 09:50:24 2016 Nobuyoshi Nakada <nobu@r...> + + * configure.in: check if the API version number is consistent with + the program version number. + Sun Jan 10 20:57:25 2016 Nobuyoshi Nakada <nobu@r...> * compile.c (compile_massign_lhs): when index ends with splat, -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/