ruby-changes:27455
From: nobu <ko1@a...>
Date: Tue, 26 Feb 2013 15:12:25 +0900 (JST)
Subject: [ruby-changes:27455] nobu:r39507 (trunk): mkconfig.rb: reconstruct comma separated list values
nobu 2013-02-26 15:12:17 +0900 (Tue, 26 Feb 2013) New Revision: 39507 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39507 Log: mkconfig.rb: reconstruct comma separated list values * tool/mkconfig.rb: reconstruct comma separated list values. a command line to Windows batch file is splitted not only by spaces and equals sign but also by commas and semicolons. Modified files: trunk/ChangeLog trunk/tool/mkconfig.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 39506) +++ ChangeLog (revision 39507) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Feb 26 15:12:11 2013 Nobuyoshi Nakada <nobu@r...> + + * tool/mkconfig.rb: reconstruct comma separated list values. a + command line to Windows batch file is splitted not only by spaces + and equals sign but also by commas and semicolons. + Tue Feb 26 15:04:19 2013 Nobuyoshi Nakada <nobu@r...> * configure.in (unexpand_shvar): get rid of non-portable shell Index: tool/mkconfig.rb =================================================================== --- tool/mkconfig.rb (revision 39506) +++ tool/mkconfig.rb (revision 39507) @@ -117,7 +117,12 @@ File.foreach "config.status" do |line| https://github.com/ruby/ruby/blob/trunk/tool/mkconfig.rb#L117 eq = win32 && vars[name] ? '<< "\n"' : '=' vars[name] = val if name == "configure_args" - val.gsub!(/ +(?!-)/, "=") if win32 + if win32 + val.gsub!(/\G(--[-a-z0-9]+)((=\S+)|(?:\s+(?!-)\S+)+)?(\s*)/) { + _, opt, list, arg, sep = *$~ + "#{opt}#{arg || list && list.sub(/^\s+/, '=').tr_s(' ', ',')}#{sep}" + } + end val.gsub!(/--with-out-ext/, "--without-ext") end val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/