summaryrefslogtreecommitdiff
path: root/ext/extmk.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-19 15:06:11 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-19 15:11:41 +0900
commitc53aec73ddf94bb9a06bead62c3bf58c5ba49bd3 (patch)
tree29e431dfe51aef4247a31b74bd52e1606d41cb93 /ext/extmk.rb
parentf6239ce0fc906c9d407e7da33f447575670a79bd (diff)
Configure static extensions only if in charge
Get rid of races in parallel configuration when using the ext/Setup file.
Diffstat (limited to 'ext/extmk.rb')
-rwxr-xr-xext/extmk.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 6045750..80a0a12 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -463,7 +463,11 @@ end unless $extstatic
if ARGV[0]
ext_prefix, exts = ARGV.shift.split('/', 2)
$extension = [exts] if exts
- @gemname = exts if ext_prefix == 'gems'
+ if ext_prefix == 'gems'
+ @gemname = exts
+ elsif exts
+ $static_ext.delete_if {|t, *| !File.fnmatch(t, exts)}
+ end
end
ext_prefix = "#{$top_srcdir}/#{ext_prefix || 'ext'}"
exts = $static_ext.sort_by {|t, i| i}.collect {|t, i| t}