diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-26 06:12:17 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-26 06:12:17 +0000 |
commit | b3d2b56d2b92af712501ebb1bd5a1b7c06dbe1d3 (patch) | |
tree | b7fa0f6270e5352ac9ba372ee03ab9eb87982235 /tool | |
parent | a4ccd46d31ea9d67756e60a105fb9c3c3c3d063a (diff) | |
download | ruby-b3d2b56d2b92af712501ebb1bd5a1b7c06dbe1d3.tar.gz |
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/mkconfig.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index a37aaa8330..79ba0454e3 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -117,7 +117,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 |