From 642cf3fc8a0f7c31875d4bbc3628f835ebfc48a5 Mon Sep 17 00:00:00 2001 From: David Rodriguez Date: Mon, 18 Mar 2024 20:58:49 +0100 Subject: Consider `target_prefix` in extension Makefiles --- tool/rbinstall.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3