summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2022-10-16 16:31:37 +0900
committernagachika <nagachika@ruby-lang.org>2022-10-16 16:31:37 +0900
commited960c6750d21b4c473044d9516e3a9eb2d335d0 (patch)
tree21eee7a1225518549156386f38949665f442a4fd /ext
parent363dc5d131398a2c62717fb861e1cdb13ca30212 (diff)
merge revision(s) d7afaf21f2edfac8a606891868a3c4a7025267bd:
Move the target directory of bundled gems like as rubygems --- ext/extmk.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Diffstat (limited to 'ext')
-rwxr-xr-xext/extmk.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 1ba0db8285..ea4b1795d4 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -2,6 +2,9 @@
# -*- mode: ruby; coding: us-ascii -*-
# frozen_string_literal: false
+module Gem; end # only needs Gem::Platform
+require 'rubygems/platform'
+
# :stopdoc:
$extension = nil
$extstatic = nil
@@ -538,11 +541,12 @@ extend Module.new {
super(*args) do |conf|
conf.find do |s|
s.sub!(/^(TARGET_SO_DIR *= *)\$\(RUBYARCHDIR\)/) {
- "TARGET_GEM_DIR = $(extout)/gems/$(arch)/#{@gemname}\n"\
+ "TARGET_GEM_DIR = $(topdir)/.bundle/extensions/$(gem_platform)/$(ruby_version)/#{@gemname}\n"\
"#{$1}$(TARGET_GEM_DIR)$(target_prefix)"
}
end
conf.any? {|s| /^TARGET *= *\S/ =~ s} and conf << %{
+gem_platform = #{Gem::Platform.local}
# default target
all: