From 8dda932bcded3607c189d169333bbad0860d7efd Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 26 Mar 2024 11:10:20 +0900 Subject: Fix extension installer for out-of-place build https://github.com/ruby/ruby/pull/9673#issuecomment-2019028293 --- tool/rbinstall.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index c3926e98ec..97fe1eab45 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -784,7 +784,12 @@ module RbInstall end def makefile_path - "#{makefile_dir}/Makefile" + if File.exist?("#{makefile_dir}/Makefile") + "#{makefile_dir}/Makefile" + else + # for out-of-place build + "#{$ext_build_dir}/#{relative_base}/Makefile" + end end def makefile_dir -- cgit v1.2.3