ruby-changes:10434
From: nobu <ko1@a...>
Date: Tue, 3 Feb 2009 07:01:38 +0900 (JST)
Subject: [ruby-changes:10434] Ruby:r21982 (trunk): * mkconfig.rb (patchlevel): config.status may not contain
nobu 2009-02-03 07:01:26 +0900 (Tue, 03 Feb 2009) New Revision: 21982 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21982 Log: * mkconfig.rb (patchlevel): config.status may not contain PATCHLEVEL even if other version numbers exist. Modified files: trunk/ChangeLog trunk/mkconfig.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 21981) +++ ChangeLog (revision 21982) @@ -1,3 +1,8 @@ +Tue Feb 3 07:01:21 2009 Nobuyoshi Nakada <nobu@r...> + + * mkconfig.rb (patchlevel): config.status may not contain + PATCHLEVEL even if other version numbers exist. + Mon Feb 2 23:43:00 2009 Tanaka Akira <akr@f...> * ext/socket/raddrinfo.c (Init_addrinfo): add AddrInfo#to_s as an Index: mkconfig.rb =================================================================== --- mkconfig.rb (revision 21981) +++ mkconfig.rb (revision 21982) @@ -38,6 +38,7 @@ v_others = [] vars = {} has_version = false +has_patchlevel = false continued_name = nil continued_line = nil File.foreach "config.status" do |line| @@ -95,7 +96,12 @@ else v_others << v end - has_version = true if name == "MAJOR" + case name + when "MAJOR" + has_version = true + when "PATCHLEVEL" + has_patchlevel = true + end end # break if /^CEOF/ end @@ -114,6 +120,8 @@ print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n" print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n" } +end +unless has_patchlevel patchlevel = IO.foreach(File.join(srcdir, "version.h")) {|l| m = /^\s*#\s*define\s+RUBY_PATCHLEVEL\s+(-?\d+)/.match(l) and break m[1] } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/