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
This commit is contained in:
parent
a4ccd46d31
commit
b3d2b56d2b
@ -1,3 +1,9 @@
|
|||||||
|
Tue Feb 26 15:12:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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@ruby-lang.org>
|
Tue Feb 26 15:04:19 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* configure.in (unexpand_shvar): get rid of non-portable shell
|
* configure.in (unexpand_shvar): get rid of non-portable shell
|
||||||
|
@ -117,7 +117,12 @@ File.foreach "config.status" do |line|
|
|||||||
eq = win32 && vars[name] ? '<< "\n"' : '='
|
eq = win32 && vars[name] ? '<< "\n"' : '='
|
||||||
vars[name] = val
|
vars[name] = val
|
||||||
if name == "configure_args"
|
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")
|
val.gsub!(/--with-out-ext/, "--without-ext")
|
||||||
end
|
end
|
||||||
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
|
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
|
||||||
|
Loading…
x
Reference in New Issue
Block a user