зеркало из https://github.com/github/ruby.git
version.h: RUBY_RELEASE_DATE from YMD
* configure.in: extract RUBY_RELEASE_DAY at generating Makefile. * version.h (RUBY_RELEASE_DATE): construct from RUBY_RELEASE_YEAR, RUBY_RELEASE_MONTH, and RUBY_RELEASE_DAY. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
fe2123f3ec
Коммит
63ebdd4bed
|
@ -1,3 +1,10 @@
|
|||
Fri Dec 25 22:43:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in: extract RUBY_RELEASE_DAY at generating Makefile.
|
||||
|
||||
* version.h (RUBY_RELEASE_DATE): construct from RUBY_RELEASE_YEAR,
|
||||
RUBY_RELEASE_MONTH, and RUBY_RELEASE_DAY.
|
||||
|
||||
Fri Dec 25 21:33:06 2015 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* version.h (RUBY_VERSION): 2.4.0 development has started.
|
||||
|
|
|
@ -90,6 +90,7 @@ POSTLINK = @POSTLINK@
|
|||
|
||||
RUBY_BASE_NAME=@RUBY_BASE_NAME@
|
||||
RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@
|
||||
RUBY_RELEASE_DATE = $(RUBY_RELEASE_YEAR)-$(RUBY_RELEASE_MONTH)-$(RUBY_RELEASE_DAY)
|
||||
RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
|
||||
RUBY_SO_NAME=@RUBY_SO_NAME@
|
||||
EXEEXT = @EXEEXT@
|
||||
|
|
|
@ -4409,7 +4409,12 @@ AC_CONFIG_FILES(Makefile, [
|
|||
["git svn"], [VCSUP='$(VCS) rebase $(GITSVNREBASEOPTIONS)'],
|
||||
[git], [VCSUP='$(VCS) pull $(GITPULLOPTIONS)'],
|
||||
[VCSUP='$(VCS)'])
|
||||
sed -n 's/^@%:@define \(RUBY_RELEASE_DATE\) "\(.*\)"/\1 = \2/p' "$srcdir/version.h"
|
||||
sed -n \
|
||||
-e '[/^@%:@define \(RUBY_RELEASE_[A-Z]*\) \([0-9][0-9]*\)/]{' \
|
||||
-e 's//\1 = \2/' \
|
||||
-e '[s/ \([0-9]\)$/ 0\1/]' \
|
||||
-e p \
|
||||
-e '}' "$srcdir/version.h"
|
||||
sed '/^MISSING/s/\$U\././g;/^VCS *=/s#@VCS@#'"$VCS"'#;/^VCSUP *=/s#@VCSUP@#'"$VCSUP"'#' Makefile
|
||||
echo; test x"$EXEEXT" = x || echo 'miniruby: miniruby$(EXEEXT)'
|
||||
if test "$gnumake" != yes; then
|
||||
|
|
18
version.h
18
version.h
|
@ -1,5 +1,5 @@
|
|||
#define RUBY_VERSION "2.4.0"
|
||||
#define RUBY_RELEASE_DATE "2015-12-25"
|
||||
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
||||
#define RUBY_PATCHLEVEL -1
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2015
|
||||
|
@ -8,6 +8,22 @@
|
|||
|
||||
#include "ruby/version.h"
|
||||
|
||||
#ifndef TOKEN_PASTE
|
||||
#define TOKEN_PASTE(x,y) x##y
|
||||
#endif
|
||||
#define ONLY_ONE_DIGIT(x) TOKEN_PASTE(10,x) < 1000
|
||||
#define RUBY_RELEASE_YEAR_STR STRINGIZE(RUBY_RELEASE_YEAR)
|
||||
#if ONLY_ONE_DIGIT(RUBY_RELEASE_MONTH)
|
||||
#define RUBY_RELEASE_MONTH_STR "0"STRINGIZE(RUBY_RELEASE_MONTH)
|
||||
#else
|
||||
#define RUBY_RELEASE_MONTH_STR STRINGIZE(RUBY_RELEASE_MONTH)
|
||||
#endif
|
||||
#if ONLY_ONE_DIGIT(RUBY_RELEASE_DAY)
|
||||
#define RUBY_RELEASE_DAY_STR "0"STRINGIZE(RUBY_RELEASE_DAY)
|
||||
#else
|
||||
#define RUBY_RELEASE_DAY_STR STRINGIZE(RUBY_RELEASE_DAY)
|
||||
#endif
|
||||
|
||||
#if !defined RUBY_LIB_VERSION && defined RUBY_LIB_VERSION_STYLE
|
||||
# if RUBY_LIB_VERSION_STYLE == 3
|
||||
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)"."STRINGIZE(RUBY_API_VERSION_TEENY)
|
||||
|
|
Загрузка…
Ссылка в новой задаче