mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
extmk.rb: exclude recursively
* ext/extmk.rb: exclude extension libraries recursively. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0512ab04b9
commit
4328d1f50d
1 changed files with 7 additions and 3 deletions
10
ext/extmk.rb
10
ext/extmk.rb
|
@ -496,13 +496,17 @@ cond = proc {|ext, *|
|
|||
}
|
||||
($extension || %w[*]).each do |e|
|
||||
e = e.sub(/\A(?:\.\/)+/, '')
|
||||
exts |= Dir.glob("#{ext_prefix}/#{e}/**/extconf.rb").collect {|d|
|
||||
incl, excl = Dir.glob("#{ext_prefix}/#{e}/**/extconf.rb").collect {|d|
|
||||
d = File.dirname(d)
|
||||
d.slice!(0, ext_prefix.length + 1)
|
||||
d
|
||||
}.find_all {|ext|
|
||||
}.partition {|ext|
|
||||
with_config(ext, &cond)
|
||||
}.sort
|
||||
}
|
||||
incl.sort!
|
||||
excl.sort!.collect! {|d| d+"/"}
|
||||
nil while incl.reject! {|d| excl << d+"/" if excl.any? {|e| d.start_with?(e)}}
|
||||
exts |= incl
|
||||
if $LIBRUBYARG_SHARED.empty? and CONFIG["EXTSTATIC"] == "static"
|
||||
exts.delete_if {|d| File.fnmatch?("-*", d)}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue