class Rake::ExtensionTask

def find_make

def find_make
  candidates = ["gmake", "make"]
  paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR)
  exeext = RbConfig::CONFIG["EXEEXT"]
  candidates.each do |candidate|
    paths.each do |path|
      make = File.join(path, "#{candidate}#{exeext}")
      return make if File.executable?(make)
    end
  end
  nil
end