Allow glob patterns in ext/Setup
This commit is contained in:
parent
c40b0d52be
commit
143a1be128
13
ext/extmk.rb
13
ext/extmk.rb
@ -472,12 +472,13 @@ if exts = ARGV.shift
|
|||||||
$extension = [exts] if exts
|
$extension = [exts] if exts
|
||||||
if ext_prefix.start_with?('.')
|
if ext_prefix.start_with?('.')
|
||||||
@gemname = exts
|
@gemname = exts
|
||||||
elsif exts
|
exts = []
|
||||||
$static_ext.delete_if {|t, *| !File.fnmatch(t, exts)}
|
else
|
||||||
|
exts &&= $static_ext.select {|t, *| File.fnmatch(t, exts)}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
ext_prefix = "#{$top_srcdir}/#{ext_prefix || 'ext'}"
|
ext_prefix ||= 'ext'
|
||||||
exts = $static_ext.sort_by {|t, i| i}.collect {|t, i| t}
|
exts = (exts || $static_ext).sort_by {|t, i| i}.collect {|t, i| t}
|
||||||
default_exclude_exts =
|
default_exclude_exts =
|
||||||
case
|
case
|
||||||
when $cygwin
|
when $cygwin
|
||||||
@ -626,7 +627,9 @@ $hdrdir = ($top_srcdir = relative_from(srcdir, $topdir = "..")) + "/include"
|
|||||||
extso = []
|
extso = []
|
||||||
fails = []
|
fails = []
|
||||||
exts.each do |d|
|
exts.each do |d|
|
||||||
$static = $force_static ? true : $static_ext[d]
|
$static = $force_static ? true : $static_ext.fetch(d) do
|
||||||
|
$static_ext.any? {|t, | File.fnmatch?(t, d)}
|
||||||
|
end
|
||||||
|
|
||||||
if !$nodynamic or $static
|
if !$nodynamic or $static
|
||||||
result = extmake(d, ext_prefix, !@gemname) or abort
|
result = extmake(d, ext_prefix, !@gemname) or abort
|
||||||
|
Loading…
x
Reference in New Issue
Block a user