From 083e7080d19a5f6489cae5a060c533ea1932de75 Mon Sep 17 00:00:00 2001 From: David Rodriguez Date: Mon, 18 Mar 2024 20:58:49 +0100 Subject: [PATCH] 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 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