-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Rake task doc:doxygen (and friends.) Output to vm/doc/generated/.
- Loading branch information
Eero Saynatkari
committed
Oct 19, 2008
1 parent
1557eca
commit 85a93f4
Showing
2 changed files
with
57 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters