summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2024-03-18 20:58:49 +0100
committerTakashi Kokubun <takashikkbn@gmail.com>2024-05-28 13:30:26 -0700
commit642cf3fc8a0f7c31875d4bbc3628f835ebfc48a5 (patch)
treea0b76a84df056902e24e99f065d4724540a5ebc2
parent57b56225acbf2d0c08c3c9271c531e389359f453 (diff)
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 2a93864e4a..6b93b189c2 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -769,7 +769,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