diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-07 02:49:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-07 02:49:27 +0000 |
commit | 7096081ac2e59e6809fe804a14a69fa800cc8876 (patch) | |
tree | c97a636fc29984cb387b57b5b3c516780cb56690 /ext | |
parent | 13ecc2289c26fedc42250f498d09c98a427d1dc7 (diff) | |
download | ruby-7096081ac2e59e6809fe804a14a69fa800cc8876.tar.gz |
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
Diffstat (limited to 'ext')
-rwxr-xr-x | ext/extmk.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb index e83a0e5d8c..2cad5753ac 100755 --- a/ext/extmk.rb +++ b/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 |