ruby-changes:17278
From: knu <ko1@a...>
Date: Fri, 17 Sep 2010 02:34:48 +0900 (JST)
Subject: [ruby-changes:17278] Ruby:r29278 (trunk): * tool/mkconfig.rb: Fix build with m4 1.4.15 generating duplicate
knu 2010-09-17 02:28:42 +0900 (Fri, 17 Sep 2010) New Revision: 29278 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29278 Log: * tool/mkconfig.rb: Fix build with m4 1.4.15 generating duplicate lines in config.status. According to nobu, the mswin32 port may depend on the piece of code in question, so the behavior is left unchanged on mswin32. Modified files: trunk/ChangeLog trunk/tool/mkconfig.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 29277) +++ ChangeLog (revision 29278) @@ -1,3 +1,10 @@ +Fri Sep 17 02:18:41 2010 Akinori MUSHA <knu@i...> + + * tool/mkconfig.rb: Fix build with m4 1.4.15 generating duplicate + lines in config.status. According to nobu, the mswin32 port may + depend on the piece of code in question, so the behavior is left + unchanged on mswin32. + Thu Sep 16 23:47:59 2010 Tanaka Akira <akr@f...> * ext/pathname/pathname.c (path_opendir): Pathname#opendir translated Index: tool/mkconfig.rb =================================================================== --- tool/mkconfig.rb (revision 29277) +++ tool/mkconfig.rb (revision 29278) @@ -35,6 +35,7 @@ ] arch = RUBY_PLATFORM +win32 = /mswin32/ =~ arch v_fast = [] v_others = [] vars = {} @@ -51,19 +52,17 @@ name = $1 val = $2 if $3 - continued_line = [] - continued_line << val + continued_line = [val] continued_name = name next end when /^"(.*)"\s*(\\)?$/ - if continued_line - continued_line << $1 - next if $2 - val = continued_line.join("") - name = continued_name - continued_line = nil - end + next if !continued_line + continued_line << $1 + next if $2 + val = continued_line.join + name = continued_name + continued_line = nil when /^(?:ac_given_)?INSTALL=(.*)/ v_fast << " CONFIG[\"INSTALL\"] = " + $1 + "\n" end @@ -112,14 +111,14 @@ end end if name == "configure_args" - val.gsub!(/ +(?!-)/, "=") if /mswin32/ =~ RUBY_PLATFORM + val.gsub!(/ +(?!-)/, "=") if win32 val.gsub!(/--with-out-ext/, "--without-ext") end val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump if /^prefix$/ =~ name val = "(TOPDIR || DESTDIR + #{val})" end - v = " CONFIG[\"#{name}\"] #{vars[name] ? '<< "\n"' : '='} #{val}\n" + v = " CONFIG[\"#{name}\"] #{win32 && vars[name] ? '<< "\n"' : '='} #{val}\n" vars[name] = true if fast[name] v_fast << v -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/