def self.create_makefile_with_core(hdrs, name)
if hdrs.call
create_makefile(name)
return true
end
ruby_dir = if RUBY_PATCHLEVEL < 0
REVISION_MAP[RUBY_REVISION] or
no_source_abort("ruby-#{RUBY_VERSION} (revision #{RUBY_REVISION})")
else
"ruby-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
end
if RbConfig::CONFIG["rubyhdrdir"]
dest_dir = RbConfig::CONFIG["rubyhdrdir"] + "/" + ruby_dir
with_cppflags("-I" + dest_dir) {
if hdrs.call
create_makefile(name)
return true
end
}
end
dest_dir = File.dirname(__FILE__) + "/ruby_core_source/#{ruby_dir}"
no_source_abort(ruby_dir) unless File.directory?(dest_dir)
with_cppflags("-I" + dest_dir) {
if hdrs.call
create_makefile(name)
return true
end
}
return false
end