aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2024-03-18 20:58:49 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-03-25 11:55:08 +0900
commit083e7080d19a5f6489cae5a060c533ea1932de75 (patch)
treecbea39066dcec7295717e84550492007cc3f603e
parent2b703eed46237d28ca71f3ed24f77bf53cf81720 (diff)
downloadruby-083e7080d19a5f6489cae5a060c533ea1932de75.tar.gz
Consider `target_prefix` in extension Makefiles
-rwxr-xr-xtool/rbinstall.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index ee09397cd2..1a5119d87e 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -573,7 +573,12 @@ module RbInstall
return [] if name.empty?
feature = makefile[/^DLLIB[ \t]*=[ \t]*((?:.*\\\n)*.*)/, 1]
- Array(feature.sub("$(TARGET)", name))
+ feature = feature.sub("$(TARGET)", name)
+
+ target_prefix = makefile[/^target_prefix[ \t]*=[ \t]*((?:.*\\\n)*.*)/, 1]
+ feature = File.join(target_prefix.delete_prefix("/"), feature) unless target_prefix.empty?
+
+ Array(feature)
end
def makefile_path