summaryrefslogtreecommitdiff
path: root/tool/mkconfig.rb
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-24 15:42:06 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-24 15:42:06 +0000
commit876fb07fde3bebdc27efc91df67de5cd4b40aa52 (patch)
tree5ca9cc838eb18f0563fe8d73766d434d4b52ffff /tool/mkconfig.rb
parent63b661679891bd4f5334864564cae12e3f6b0391 (diff)
merge revision(s) 39507,39508: [Backport #7963]
* 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. command line to Windows batch file is split not only by spaces and equal signs but also by commas and semicolons. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/mkconfig.rb')
-rwxr-xr-xtool/mkconfig.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index d8e9f0f3b7..514c8c81ad 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -116,7 +116,12 @@ File.foreach "config.status" do |line|
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