Skip to content

Commit

Permalink
revert r53459, r53427, r53314
Browse files Browse the repository at this point in the history
Revert "* tool/make-snapshot: fix for the changes of version.h in r53314."
Revert "* version.h (RUBY_BUILD_VERSION_STR_3): Workaround for old version of"
Revert "program version from API version"

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jan 9, 2016
1 parent fca0cf6 commit bc8a7f9
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 58 deletions.
17 changes: 0 additions & 17 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ Fri Jan 8 17:07:14 2016 Koichi Sasada <[email protected]>
Also type of heap_page::(total|free|final)_slots are changed from
int to short. 2B is enough for them.

Fri Jan 8 12:30:54 2016 Shugo Maeda <[email protected]>

* tool/make-snapshot: fix for the changes of version.h in r53314.

Fri Jan 8 09:33:59 2016 Shugo Maeda <[email protected]>

* iseq.c (rb_iseq_compile_with_option): move variable initialization
Expand Down Expand Up @@ -124,11 +120,6 @@ Mon Jan 4 15:36:38 2016 Sho Hashimoto <[email protected]>
* thread_sync.c: [DOC] remove SizedQueue#close argument.
[ci skip]

Mon Jan 4 12:07:00 2016 Naohisa Goto <[email protected]>

* version.h (RUBY_BUILD_VERSION_STR_3): Workaround for old version of
Fujitsu C Compiler (fcc) on Solaris. [Bug #11944] [ruby-dev:49468]

Mon Jan 4 10:14:24 2016 SHIBATA Hiroshi <[email protected]>

* test/coverage/test_coverage.rb: ignored test when enabled to coverage.
Expand Down Expand Up @@ -475,14 +466,6 @@ Sat Dec 26 11:26:38 2015 Nobuyoshi Nakada <[email protected]>
* miniinit.c (Init_enc): add some common aliases of built-in
encodings. [ruby-core:72481] [Bug #11872]

Sat Dec 26 01:24:40 2015 Nobuyoshi Nakada <[email protected]>

* configure.in, version.h (RUBY_PROGRAM_VERSION): extract version
numbers from API version in include/ruby/version.h except for
TEENY, to save matz job next year.

* win32/setup.mak (-version-): use program version.

Fri Dec 25 22:43:26 2015 Nobuyoshi Nakada <[email protected]>

* configure.in: extract RUBY_RELEASE_DAY at generating Makefile.
Expand Down
5 changes: 5 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ BUILTIN_TRANSOBJS = @BUILTIN_TRANSOBJS@
POSTLINK = @POSTLINK@

RUBY_BASE_NAME=@RUBY_BASE_NAME@
RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@
RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
RUBY_SO_NAME=@RUBY_SO_NAME@
EXEEXT = @EXEEXT@
Expand Down Expand Up @@ -118,6 +119,10 @@ BOOTSTRAPRUBY = @BOOTSTRAPRUBY@

#### End of system configuration section. ####

MAJOR= @MAJOR@
MINOR= @MINOR@
TEENY= @TEENY@

LIBRUBY_A = @LIBRUBY_A@
LIBRUBY_SO = @LIBRUBY_SO@
LIBRUBY_ALIASES= @LIBRUBY_ALIASES@
Expand Down
1 change: 0 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ ECHO = @$(ECHO0)

UNICODE_VERSION = 8.0.0

RUBY_PROGRAM_VERSION = $(MAJOR).$(MINOR).$(TEENY)
RUBY_RELEASE_DATE = $(RUBY_RELEASE_YEAR)-$(RUBY_RELEASE_MONTH)-$(RUBY_RELEASE_DAY)
RUBYLIB = $(PATH_SEPARATOR)
RUBYOPT = -
Expand Down
10 changes: 2 additions & 8 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ 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]*\)/\1=\2/p' $srcdir/include/ruby/version.h`
eval `sed -n 's/^#define RUBY_PROGRAM_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)
Expand All @@ -234,7 +233,7 @@ done
AC_SUBST(MAJOR)
AC_SUBST(MINOR)
AC_SUBST(TEENY)
RUBY_PROGRAM_VERSION=$MAJOR.$MINOR.$TEENY
RUBY_PROGRAM_VERSION=`sed -n 's/^#define RUBY_VERSION "\(.*\)"/\1/p' $srcdir/version.h`
AC_SUBST(RUBY_PROGRAM_VERSION)
RUBY_PATCHLEVEL=`sed -n 's/^#define RUBY_PATCHLEVEL //p' $srcdir/version.h`
AC_DEFINE(CANONICALIZATION_FOR_MATHN)
Expand Down Expand Up @@ -4410,12 +4409,7 @@ AC_CONFIG_FILES(Makefile, [
["git svn"], [VCSUP='$(VCS) rebase $(GITSVNREBASEOPTIONS)'],
[git], [VCSUP='$(VCS) pull $(GITPULLOPTIONS)'],
[VCSUP='$(VCS)'])
# MAJOR and MINOR are public and come from include/ruby/version.h by reconfig
echo MAJOR = $MAJOR
echo MINOR = $MINOR
# TEENY is private and come from version.h
sed -n \
-e '[s/^@%:@define RUBY_PROGRAM_VERSION_\([A-Z]*\) \([0-9][0-9]*\)/\1 = \2/p]' \
-e '[/^@%:@define \(RUBY_RELEASE_[A-Z]*\) \([0-9][0-9]*\)/]{' \
-e 's//\1 = \2/' \
-e '[s/ \([0-9]\)$/ 0\1/]' \
Expand Down Expand Up @@ -4443,7 +4437,7 @@ AC_CONFIG_FILES(Makefile, [
echo 'ruby: $(PROGRAM);' >> $tmpmk
test "$tmpmk" = "$tmpgmk" || rm -f "$tmpgmk"
fi && mv -f $tmpmk Makefile],
[EXEEXT='$EXEEXT' MAJOR='$MAJOR' MINOR='$MINOR' gnumake='$gnumake'])
[EXEEXT='$EXEEXT' gnumake='$gnumake'])

AC_ARG_WITH([ruby-pc],
AC_HELP_STRING([--with-ruby-pc=FILENAME], [pc file basename]),
Expand Down
16 changes: 0 additions & 16 deletions tool/make-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ PACKAGES = {
ENV["LC_ALL"] = ENV["LANG"] = "C"
SVNURL = URI.parse("http://svn.ruby-lang.org/repos/ruby/")
RUBY_VERSION_PATTERN = /^\#define\s+RUBY_VERSION\s+"([\d.]+)"/
RUBY_API_VERSION_PATTERN = /^\#define\s+RUBY_API_VERSION_MAJOR\s+([\d]+)\n+\#define\s+RUBY_API_VERSION_MINOR\s+([\d]+)\n+\#define\s+RUBY_API_VERSION_TEENY\s+([\d]+)/

ENV["VPATH"] ||= "include/ruby"
YACC = ENV["YACC"] ||= "bison"
Expand Down Expand Up @@ -210,13 +209,6 @@ def package(vcs, rev, destdir, tmp = nil)
end
open("#{v}/revision.h", "wb") {|f| f.puts "#define RUBY_REVISION #{revision}"}
version ||= (versionhdr = IO.read("#{v}/version.h"))[RUBY_VERSION_PATTERN, 1]
unless version
s = IO.read("#{v}/include/ruby/version.h")
api_version_components = s.scan(RUBY_API_VERSION_PATTERN)[0]
if api_version_components
version = api_version_components.join(".")
end
end
version or return
if patchlevel
unless tag.empty?
Expand Down Expand Up @@ -326,14 +318,6 @@ clean-cache $(CLEAN_CACHE): after-update
after-update:: extract-gems
extract-gems:
APPEND
if /^MAJOR\s*=/ !~ mk
major, minor, teeny = version.split(".")
mk.prepend(<<-PREPEND)
MAJOR = #{major}
MINOR = #{minor}
TEENY = #{teeny}
PREPEND
end
open(clean.add("Makefile"), "w") do |f|
f.puts mk
end
Expand Down
16 changes: 3 additions & 13 deletions version.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
#define RUBY_PROGRAM_VERSION_MAJOR RUBY_API_VERSION_MAJOR
#define RUBY_PROGRAM_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_PROGRAM_VERSION_TEENY 0

#define RUBY_BUILD_VERSION_STR_2(v) STRINGIZE(v##_MAJOR)"."STRINGIZE(v##_MINOR)
#define RUBY_BUILD_VERSION_STR_3(v) STRINGIZE(v##_MAJOR)"."STRINGIZE(v##_MINOR)"."STRINGIZE(v##_TEENY)

#define RUBY_PROGRAM_VERSION RUBY_BUILD_VERSION_STR_3(RUBY_PROGRAM_VERSION)
#define RUBY_VERSION RUBY_PROGRAM_VERSION
#define RUBY_VERSION "2.4.0"
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
#define RUBY_PATCHLEVEL -1

Expand All @@ -33,13 +25,11 @@
#define RUBY_RELEASE_DAY_STR STRINGIZE(RUBY_RELEASE_DAY)
#endif

#define RUBY_LIB_VERSION_2 RUBY_BUILD_VERSION_STR_2(RUBY_API_VERSION)
#define RUBY_LIB_VERSION_3 RUBY_BUILD_VERSION_STR_3(RUBY_API_VERSION)
#if !defined RUBY_LIB_VERSION && defined RUBY_LIB_VERSION_STYLE
# if RUBY_LIB_VERSION_STYLE == 3
# define RUBY_LIB_VERSION RUBY_LIB_VERSION_3
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)"."STRINGIZE(RUBY_API_VERSION_TEENY)
# elif RUBY_LIB_VERSION_STYLE == 2
# define RUBY_LIB_VERSION RUBY_LIB_VERSION_2
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)
# endif
#endif

Expand Down
7 changes: 4 additions & 3 deletions win32/setup.mak
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ int main(void) {return (EnumProcesses(NULL,0,NULL) ? 0 : 1);}
@$(CPP) -I$(srcdir) -I$(srcdir)/include <<"Creating $(MAKEFILE)" | findstr "=" >>$(MAKEFILE)
#define RUBY_REVISION 0
#include "version.h"
MAJOR = RUBY_PROGRAM_VERSION_MAJOR
MINOR = RUBY_PROGRAM_VERSION_MINOR
TEENY = RUBY_PROGRAM_VERSION_TEENY
MAJOR = RUBY_API_VERSION_MAJOR
MINOR = RUBY_API_VERSION_MINOR
TEENY = RUBY_API_VERSION_TEENY
RUBY_PROGRAM_VERSION = RUBY_VERSION
MSC_VER = _MSC_VER
<<

Expand Down

0 comments on commit bc8a7f9

Please sign in to comment.