Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

76 lines (54 sloc) 1.997 kb
require "fileutils"
namespace :doc do
desc "Generate HTML, LaTeX and man(3) documentation from codebase."
task :doxygen => "doc:doxygen:generate"
desc "Generate opcode docs."
task :opcode => "doc:opcode:generate"
desc "Delete all generated documentation"
task :clean => %w[doc:doxygen:clean doc:opcode:clean]
# TODO: rename task to :vm and make it a dependency for doc:build.
namespace :doxygen do
directory "doc/generated/vm"
desc "Generate HTML, LaTeX and man(3) documentation from codebase."
task :generate => %w[doc/generated/vm doc/vm/doxygen.conf] do
sh "doxygen doc/vm/doxygen.conf"
end
desc "Delete all documentation generated by Doxygen"
task :clean do
if File.directory? "doc/generated/vm"
FileUtils.rm_r "doc/generated/vm", :secure => true, :verbose => $verbose
end
end
end
# TODO: rename task to :build and generalize for all generated
# documentation, not just opcode docs.
namespace :opcode do
desc "Generate opcode documentation HTML"
task :generate => "doc/vm/toc.html"
directory "doc/generated/opcode"
file 'doc/generated/opcode/toc.html' => %w[
doc/generated/opcode shotgun/lib/instructions.rb] do
rbx 'doc/vm/gen_op_code_html.rb'
end
rule '.html' => %w[.txt doc/vm/rdoc.rb] do |t|
rbx 'doc/vm/rdoc.rb', t.source, t.name
end
task :html => %w[
build
doc/generated/opcode/toc.html
doc/generated/opcode/concurrency.html
doc/generated/opcode/intro.html
doc/generated/opcode/method_dispatch.html
doc/generated/opcode/rbc_files.html
doc/generated/opcode/rubinius_vs_mri.html
doc/generated/opcode/shotgun.html
doc/generated/opcode/vm_interfaces.html
]
desc "Remove all generated opcode docs"
task :clean do
Dir.glob('doc/generated/opcode/**/*.html').each do |html|
rm_f html unless html =~ /\/?index.html$/
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.