Consider target_prefix in extension Makefiles

This commit is contained in:
David Rodriguez 2024-03-18 20:58:49 +01:00 committed by Hiroshi SHIBATA
parent 2b703eed46
commit 083e7080d1

View File

@ -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