ruby-changes:41387
From: shugo <ko1@a...>
Date: Fri, 8 Jan 2016 12:34:51 +0900 (JST)
Subject: [ruby-changes:41387] shugo:r53459 (trunk): * tool/make-snapshot: fix for the changes of version.h in r53314.
shugo 2016-01-08 12:35:06 +0900 (Fri, 08 Jan 2016) New Revision: 53459 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53459 Log: * tool/make-snapshot: fix for the changes of version.h in r53314. Modified files: trunk/ChangeLog trunk/tool/make-snapshot Index: ChangeLog =================================================================== --- ChangeLog (revision 53458) +++ ChangeLog (revision 53459) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jan 8 12:30:54 2016 Shugo Maeda <shugo@r...> + + * tool/make-snapshot: fix for the changes of version.h in r53314. + Fri Jan 8 09:33:59 2016 Shugo Maeda <shugo@r...> * iseq.c (rb_iseq_compile_with_option): move variable initialization Index: tool/make-snapshot =================================================================== --- tool/make-snapshot (revision 53458) +++ tool/make-snapshot (revision 53459) @@ -46,6 +46,7 @@ PACKAGES = { https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L46 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 https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L210 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 https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L326 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/