diff options
author | David Rodriguez <deivid.rodriguez@riseup.net> | 2024-03-18 20:58:49 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-03-25 11:55:08 +0900 |
commit | 083e7080d19a5f6489cae5a060c533ea1932de75 (patch) | |
tree | cbea39066dcec7295717e84550492007cc3f603e /tool | |
parent | 2b703eed46237d28ca71f3ed24f77bf53cf81720 (diff) | |
download | ruby-083e7080d19a5f6489cae5a060c533ea1932de75.tar.gz |
Consider `target_prefix` in extension Makefiles
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/rbinstall.rb | 7 |
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 |