ruby-changes:5855
From: shyouhei <ko1@a...>
Date: Mon, 16 Jun 2008 17:21:43 +0900 (JST)
Subject: [ruby-changes:5855] Ruby:r17361 (ruby_1_8_5): merge revision(s) 11594:
shyouhei 2008-06-16 17:12:50 +0900 (Mon, 16 Jun 2008) New Revision: 17361 Modified files: branches/ruby_1_8_5/ChangeLog branches/ruby_1_8_5/mkconfig.rb branches/ruby_1_8_5/version.h Log: merge revision(s) 11594: * mkconfig.rb: autoconf 2.61 support. [ruby-core:10016] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/version.h?r1=17361&r2=17360&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/mkconfig.rb?r1=17361&r2=17360&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/ChangeLog?r1=17361&r2=17360&diff_format=u Index: ruby_1_8_5/ChangeLog =================================================================== --- ruby_1_8_5/ChangeLog (revision 17360) +++ ruby_1_8_5/ChangeLog (revision 17361) @@ -1,3 +1,7 @@ +Mon Jun 16 17:11:32 2008 Nobuyoshi Nakada <nobu@r...> + + * mkconfig.rb: autoconf 2.61 support. [ruby-core:10016] + Mon Jun 16 15:40:37 2008 Yukihiro Matsumoto <matz@r...> * proc.c (proc_dup): should copy safe_level from src proc Index: ruby_1_8_5/mkconfig.rb =================================================================== --- ruby_1_8_5/mkconfig.rb (revision 17360) +++ ruby_1_8_5/mkconfig.rb (revision 17361) @@ -36,12 +36,39 @@ v_others = [] vars = {} has_version = false +continued_name = nil +continued_line = nil File.foreach "config.status" do |line| next if /^#/ =~ line - if /^s([%,])@(\w+)@\1(?:\|\#_!!_\#\|)?(.*)\1/ =~ line + name = nil + case line + when /^s([%,])@(\w+)@\1(?:\|\#_!!_\#\|)?(.*)\1/ name = $2 val = $3.gsub(/\\(?=,)/, '') - next if /^(?:ac_.*|DEFS|configure_input)$/ =~ name + when /^S\["(\w+)"\]\s*=\s*"(.*)"\s*(\\)?$/ + name = $1 + val = $2 + if $3 + continued_line = [] + continued_line << val + continued_name = name + next + end + when /^"(.+)"\s*(\\)?$/ + if continued_line + continued_line << $1 + unless $2 + val = continued_line.join("") + name = continued_name + continued_line = nil + end + end + when /^(?:ac_given_)?INSTALL=(.*)/ + v_fast << " CONFIG[\"INSTALL\"] = " + $1 + "\n" + end + + if name + next if /^(?:ac_.*|DEFS|configure_input|(?:top_)?srcdir|\w+OBJS)$/ =~ name next if /^\$\(ac_\w+\)$/ =~ val next if /^\$\{ac_\w+\}$/ =~ val next if /^\$ac_\w+$/ =~ val @@ -54,6 +81,7 @@ name = "ruby_install_name" val = "ruby".sub(/#{ptn[0]}/, ptn[1]) end + val.gsub!(/ +(?!-)/, "=") if name == "configure_args" && /mswin32/ =~ RUBY_PLATFORM val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump if /^prefix$/ =~ name val = "(TOPDIR || DESTDIR + #{val})" @@ -66,8 +94,6 @@ v_others << v end has_version = true if name == "MAJOR" - elsif /^(?:ac_given_)?INSTALL=(.*)/ =~ line - v_fast << " CONFIG[\"INSTALL\"] = " + $1 + "\n" end # break if /^CEOF/ end @@ -109,7 +135,8 @@ v_fast << " CONFIG[\"RUBY_SO_NAME\"] = \"" + $so_name + "\"\n" end -print v_fast, v_others +print(*v_fast) +print(*v_others) print <<EOS CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)" CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)" Index: ruby_1_8_5/version.h =================================================================== --- ruby_1_8_5/version.h (revision 17360) +++ ruby_1_8_5/version.h (revision 17361) @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2008-06-16" #define RUBY_VERSION_CODE 185 #define RUBY_RELEASE_CODE 20080616 -#define RUBY_PATCHLEVEL 221 +#define RUBY_PATCHLEVEL 222 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/