diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index cdaeff6668..63f4beb943 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -588,7 +588,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