diff --git a/ext/yarp/extconf.rb b/ext/yarp/extconf.rb index 8047062ff3f..3521f2abea1 100644 --- a/ext/yarp/extconf.rb +++ b/ext/yarp/extconf.rb @@ -56,8 +56,16 @@ def build_static_rubyparser end def build_target_rubyparser(target) + # explicit "sh" is used for Windows where shebangs are not supported Dir.chdir(root_dir) do - Rake.sh("sh configure") # explicit "sh" for Windows where shebangs are not supported + if !File.exist?("configure") && Dir.exist?(".git") + # this block only exists to support building the gem from a "git" source, + # normally we package up the configure and other files in the gem itself + Rake.sh("sh", "autoconf") + Rake.sh("sh", "autoheader") + Rake.sh("rake","templates") + end + Rake.sh("sh", "configure") Rake.sh("make", target) end end