* ext/iconv/charset_alias.rb (charset_alias): create wrapper libray
even if no target matched. * ext/iconv/extconf.rb: create wrapper library under RUBYARCHDIR directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0ccc5dbe83
commit
61bd5fb4dc
@ -1,4 +1,5 @@
|
|||||||
#! /usr/bin/ruby
|
#! /usr/bin/ruby
|
||||||
|
# :stopdoc:
|
||||||
require 'rbconfig'
|
require 'rbconfig'
|
||||||
require 'optparse'
|
require 'optparse'
|
||||||
|
|
||||||
@ -27,13 +28,12 @@ end
|
|||||||
def charset_alias(config_charset, mapfile, target = OS)
|
def charset_alias(config_charset, mapfile, target = OS)
|
||||||
map = Hash::Ordered.new
|
map = Hash::Ordered.new
|
||||||
comments = []
|
comments = []
|
||||||
match = false
|
|
||||||
open(config_charset) do |input|
|
open(config_charset) do |input|
|
||||||
input.find {|line| /^case "\$os" in/ =~ line} or return
|
input.find {|line| /^case "\$os" in/ =~ line} or break
|
||||||
input.find {|line|
|
input.find {|line|
|
||||||
/^\s*([-\w\*]+(?:\s*\|\s*[-\w\*]+)*)(?=\))/ =~ line and
|
/^\s*([-\w\*]+(?:\s*\|\s*[-\w\*]+)*)(?=\))/ =~ line and
|
||||||
$&.split('|').any? {|pattern| File.fnmatch?(pattern.strip, target)}
|
$&.split('|').any? {|pattern| File.fnmatch?(pattern.strip, target)}
|
||||||
} or return
|
} or break
|
||||||
input.find do |line|
|
input.find do |line|
|
||||||
case line
|
case line
|
||||||
when /^\s*echo "(?:\$\w+\.)?([-\w*]+)\s+([-\w]+)"/
|
when /^\s*echo "(?:\$\w+\.)?([-\w*]+)\s+([-\w]+)"/
|
||||||
|
@ -27,8 +27,12 @@ if have_func("iconv", "iconv.h") or
|
|||||||
if conf
|
if conf
|
||||||
prefix = '$(srcdir)'
|
prefix = '$(srcdir)'
|
||||||
prefix = $nmake ? "{#{prefix}}" : "#{prefix}/"
|
prefix = $nmake ? "{#{prefix}}" : "#{prefix}/"
|
||||||
|
if $extout
|
||||||
|
wrapper = "$(RUBYARCHDIR)/iconv.rb"
|
||||||
|
else
|
||||||
wrapper = "./iconv.rb"
|
wrapper = "./iconv.rb"
|
||||||
$INSTALLFILES = [[wrapper, "$(RUBYARCHDIR)"]]
|
$INSTALLFILES = [[wrapper, "$(RUBYARCHDIR)"]]
|
||||||
|
end
|
||||||
if String === conf
|
if String === conf
|
||||||
require 'uri'
|
require 'uri'
|
||||||
scheme = URI.parse(conf).scheme
|
scheme = URI.parse(conf).scheme
|
||||||
|
Loading…
x
Reference in New Issue
Block a user