summaryrefslogtreecommitdiffhomepage
path: root/tasks
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-08-26 07:46:57 +0900
committerGitHub <[email protected]>2019-08-26 07:46:57 +0900
commit2d09fd2135e4fb9230a62e2af1ff28d450f3184a (patch)
tree644a637d60bfc1c7cd2fd2bb657a08bf5dc397b5 /tasks
parenta4870a579f483b30e547f6ed5d105179be222e53 (diff)
parent6375639917a913c542967b33be01003a2b67c144 (diff)
downloadmruby-2d09fd2135e4fb9230a62e2af1ff28d450f3184a.tar.gz
mruby-2d09fd2135e4fb9230a62e2af1ff28d450f3184a.zip
Merge pull request #4669 from davidsiaw/doxygen
Fixes for Doxygen docs
Diffstat (limited to 'tasks')
-rw-r--r--tasks/doc.rake48
1 files changed, 48 insertions, 0 deletions
diff --git a/tasks/doc.rake b/tasks/doc.rake
new file mode 100644
index 000000000..4aec2d0a1
--- /dev/null
+++ b/tasks/doc.rake
@@ -0,0 +1,48 @@
+desc 'generate document'
+task :doc => [:api_doc, :capi_doc] do
+
+end
+
+desc 'generate yard docs'
+task :api_doc do
+ begin
+ sh "mrbdoc"
+ rescue
+ puts "ERROR: To generate yard documentation, you should install yard-mruby gem."
+ puts " $ gem install yard-mruby yard-coderay"
+ end
+end
+
+desc 'generate doxygen docs'
+task :capi_doc do
+ begin
+ sh "doxygen Doxyfile"
+ rescue
+ puts "ERROR: To generate C API documents, you need Doxygen."
+ puts " $ sudo apt-get install doxygen"
+ end
+end
+
+desc 'clean all built docs'
+task :clean_api_doc do
+ FileUtils.rm_rf 'doc/api'
+end
+
+desc 'clean all built docs'
+task :clean_capi_doc do
+ FileUtils.rm_rf 'doc/capi'
+end
+
+desc 'clean all built docs'
+task :clean_doc => [:clean_api_doc, :clean_capi_doc] do
+end
+
+desc 'clean all built docs'
+task :view_api => [:api_doc] do
+ sh 'xdg-open doc/api/index.html'
+end
+
+desc 'clean all built docs'
+task :view_capi => [:capi_doc] do
+ sh 'xdg-open doc/capi/html/index.html'
+end