summaryrefslogtreecommitdiff
path: root/tool/mkconfig.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/mkconfig.rb')
-rwxr-xr-xtool/mkconfig.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index a66a20f3e8..0c16df8e03 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -84,7 +84,7 @@ File.foreach "config.status" do |line|
when /^\$ac_\w+$/; next
end
if /^program_transform_name$/ =~ name
- val.sub!(/\As(\W)(?:\^|\$\$)\1\1(;|\z)/, '')
+ val.sub!(/\As(\\?\W)(?:\^|\${1,2})\1\1(;|\z)/, '')
if val.empty?
$install_name ||= "ruby"
next
@@ -92,7 +92,7 @@ File.foreach "config.status" do |line|
unless $install_name
$install_name = "ruby"
val.gsub!(/\$\$/, '$')
- val.scan(%r[\G[\s;]*(/(?:\\.|[^/])*/)?([sy])(\W)((?:\\.|(?!\3).)*)\3((?:\\.|(?!\3).)*)\3([gi]*)]) do
+ val.scan(%r[\G[\s;]*(/(?:\\.|[^/])*/)?([sy])(\\?\W)((?:\\.|(?!\3).)*)\3((?:\\.|(?!\3).)*)\3([gi]*)]) do
|addr, cmd, sep, pat, rep, opt|
if addr
Regexp.new(addr[/\A\/(.*)\/\z/, 1]) =~ $install_name or next