class Rake::Application

def have_rakefile

If a match is found, it is copied into @rakefile.
True if one of the files in RAKEFILES is in the current directory.
def have_rakefile
  @rakefiles.each do |fn|
    if File.exist?(fn) || fn == ''
      @rakefile = fn
      return true
    end
  end
  return false
end