Change soft-fail to use the config, rather than env
[rbx.git] / rakelib / doc.rake
blob3e2f88068cc5b0edee517863c56d343b4123181d
1 require 'rake/rdoctask'
2 require 'rakelib/configuration'
4 task :doc => %w[
5   doc:vm
6   doc:rdoc
9 namespace :doc do
11   task :vm => 'doc:vm:html'
13   namespace :vm do
15     desc "Remove all generated HTML files under doc/vm"
16     task :clean do
17       Dir.glob('doc/vm/**/*.html').each do |html|
18         rm_f html unless html =~ /\/?index.html$/
19       end
20     end
22     desc "Generate HTML in doc/vm"
23     file 'doc/vm/toc.html' => %w[shotgun/lib/instructions.rb] do
24       rbx 'doc/vm/gen_op_code_html.rb'
25     end
27     rule '.html' => %w[.txt doc/vm/rdoc.rb] do |t|
28       rbx 'doc/vm/rdoc.rb', t.source, t.name
29     end
31     task :html => %w[
32       build
33       doc/vm/toc.html
34       doc/vm/concurrency.html
35       doc/vm/intro.html
36       doc/vm/method_dispatch.html
37       doc/vm/rbc_files.html
38       doc/vm/rubinius_vs_mri.html
39       doc/vm/shotgun.html
40       doc/vm/toc.html
41       doc/vm/vm_interfaces.html
42       doc/vm/ffi.html
43     ]
44   end
46   desc 'Generate rdoc for kernel, lib and stdlib'
47   Rake::RDocTask.new :rdoc do |rd|
48     rd.main = 'README'
49     rd.title = "Rubinius #{RBX_VERSION} Documentation"
51     rd.rdoc_dir = 'doc/rdoc'
53     rd.rdoc_files.include 'README'
54     rd.rdoc_files.include 'README-DEVELOPERS'
55     rd.rdoc_files.include 'CONTRIBUTORS'
56     rd.rdoc_files.include 'THANKS'
57     rd.rdoc_files.include 'LICENSE'
59     rd.rdoc_files.include 'kernel/core/*.rb'
60     rd.rdoc_files.include 'kernel/bootstrap/*.rb'
61     rd.rdoc_files.include 'kernel/platform/*.rb'
63     rd.rdoc_files.include 'lib/**/*.rb'
64   end
66 end