Skip to content

Commit

Permalink
Added Rake task doc:doxygen (and friends.) Output to vm/doc/generated/.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eero Saynatkari committed Oct 19, 2008
1 parent 1557eca commit 85a93f4
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 22 deletions.
77 changes: 56 additions & 21 deletions rakelib/doc.rake
Original file line number Diff line number Diff line change
@@ -1,37 +1,72 @@
require "fileutils"


namespace :doc do

task :vm => 'doc:vm:html'
desc "Generate HTML, LaTeX and man(3) documentation from codebase."
task :doxygen => "doc:doxygen:generate"

namespace :vm do
desc "Generate opcode docs."
task :opcode => "doc:opcode:generate"

desc "Remove all generated HTML files under doc/vm"
task :clean do
Dir.glob('doc/vm/**/*.html').each do |html|
rm_f html unless html =~ /\/?index.html$/
desc "Delete all generated documentation"
task :clean => %w[doc:doxygen:clean doc:opcode:clean]


namespace :doxygen do

directory "vm/doc/generated"

desc "Generate HTML, LaTeX and man(3) documentation from codebase."
task :generate => %w[vm/doc/generated vm/doc/doxygen.conf] do
sh "doxygen vm/doc/doxygen.conf"
end
end

desc "Generate HTML in doc/vm"
file 'doc/vm/toc.html' => %w[shotgun/lib/instructions.rb] do
rbx 'doc/vm/gen_op_code_html.rb'
desc "Delete all documentation generated by Doxygen"
task :clean do
if File.directory? "vm/doc/generated"
FileUtils.rm_r "vm/doc/generated", :secure => true, :verbose => $verbose
end
end

end

namespace :opcode do

desc "Generate opcode documentation HTML"
task :generate => "vm/doc/opcode/toc.html"

directory "vm/doc/opcode"

file 'vm/doc/opcode/toc.html' => %w[vm/doc/opcode shotgun/lib/instructions.rb] do
rbx 'vm/doc/opcode/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
rule '.html' => %w[.txt vm/doc/opcode/rdoc.rb] do |t|
rbx 'vm/doc/opcode/rdoc.rb', t.source, t.name
end

task :html => %w[
build
doc/vm/toc.html
doc/vm/concurrency.html
doc/vm/intro.html
doc/vm/method_dispatch.html
doc/vm/rbc_files.html
doc/vm/rubinius_vs_mri.html
doc/vm/shotgun.html
doc/vm/toc.html
doc/vm/vm_interfaces.html
vm/doc/opcode/toc.html
vm/doc/opcode/concurrency.html
vm/doc/opcode/intro.html
vm/doc/opcode/method_dispatch.html
vm/doc/opcode/rbc_files.html
vm/doc/opcode/rubinius_vs_mri.html
vm/doc/opcode/shotgun.html
vm/doc/opcode/toc.html
vm/doc/opcode/vm_interfaces.html
]

desc "Remove all generated opcode docs"
task :clean do
Dir.glob('vm/doc/opcode/**/*.html').each do |html|
rm_f html unless html =~ /\/?index.html$/
end
end

end

end

2 changes: 1 addition & 1 deletion vm/doc/doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NUMBER = VM
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.

OUTPUT_DIRECTORY = vm/doc/generated_doc/
OUTPUT_DIRECTORY = vm/doc/generated/

# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
Expand Down

0 comments on commit 85a93f4

Please sign in to comment.