diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-28 02:12:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-28 02:12:34 +0000 |
commit | 842272540886ff1da58e690907b08f2811a86607 (patch) | |
tree | 69e0fc86b769cf95b1ec63ce4c593b2a58906460 /tool | |
parent | 1095705c4218f8f752210f1a0b4f78d96ad675ac (diff) | |
download | ruby-842272540886ff1da58e690907b08f2811a86607.tar.gz |
Moved version numbers
* Define major and minor version numbers only in the public
include/ruby/version.h header, as the API version numbers.
* Define only teeny version number in the private version.h
header.
* RUBY_VERSION moved to version.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/merger.rb | 14 | ||||
-rwxr-xr-x | tool/mkconfig.rb | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/tool/merger.rb b/tool/merger.rb index 3362eafd7a..cbe3a8df91 100755 --- a/tool/merger.rb +++ b/tool/merger.rb @@ -54,11 +54,25 @@ def version case l when /^#define RUBY_VERSION "(\d+)\.(\d+)\.(\d+)"$/ v = $~.captures + when /^#define RUBY_VERSION_TEENY (\d+)$/ + (v ||= [])[2] = $1 when /^#define RUBY_PATCHLEVEL (-?\d+)$/ p = $1 end end end + if v and !v[0] + open 'include/ruby/version.h', 'rb' do |f| + f.each_line do |l| + case l + when /^#define RUBY_API_VERSION_MAJOR (\d+)/ + v[0] = $1 + when /^#define RUBY_API_VERSION_MINOR (\d+)/ + v[1] = $1 + end + end + end + end return v, p end diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index 5da0e7da5a..fdb284b1a9 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -208,7 +208,7 @@ IO.foreach(File.join(srcdir, "version.h")) do |l| end end %w[MAJOR MINOR TEENY PATCHLEVEL].each do |v| - print " CONFIG[#{v.dump}] = #{versions[v].dump}\n" + print " CONFIG[#{v.dump}] = #{(versions[v]||vars[v]).dump}\n" end dest = drive ? %r'= "(?!\$[\(\{])(?i:[a-z]:)' : %r'= "(?!\$[\(\{])' |