diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-08 03:35:06 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-08 03:35:06 +0000 |
commit | 1645833e037cb74683baffc791996dc42af1fc19 (patch) | |
tree | e46b53d673031b286e3978ef7bb0e3b4040724e3 | |
parent | 115163421a2cc91e7296d18599dee757043235d1 (diff) | |
download | ruby-1645833e037cb74683baffc791996dc42af1fc19.tar.gz |
* tool/make-snapshot: fix for the changes of version.h in r53314.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | tool/make-snapshot | 16 |
2 files changed, 20 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Fri Jan 8 12:30:54 2016 Shugo Maeda <shugo@ruby-lang.org> + + * tool/make-snapshot: fix for the changes of version.h in r53314. + Fri Jan 8 09:33:59 2016 Shugo Maeda <shugo@ruby-lang.org> * iseq.c (rb_iseq_compile_with_option): move variable initialization diff --git a/tool/make-snapshot b/tool/make-snapshot index 865fdeb965..8566daeed5 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -46,6 +46,7 @@ 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" @@ -209,6 +210,13 @@ 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? @@ -318,6 +326,14 @@ 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 |