summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Doxyfile36
-rw-r--r--Makefile4
-rw-r--r--Makefile.doc15
-rw-r--r--Rakefile13
-rw-r--r--include/mruby/value.h5
-rw-r--r--tasks/doc.rake38
7 files changed, 52 insertions, 61 deletions
diff --git a/.gitignore b/.gitignore
index 0c9fc3fef..3e728356a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,6 +31,6 @@ tags
/benchmark/*.png
/doc/api
-/doxygen/
+/doc/capi
/src/y.tab.c
diff --git a/Doxyfile b/Doxyfile
index 9ee375f86..8724fe1ac 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -12,7 +12,7 @@ PROJECT_BRIEF = "mruby is the lightweight implementation of the Ruby la
PROJECT_LOGO = doc/mruby_logo_red_icon.png
-OUTPUT_DIRECTORY = doxygen
+OUTPUT_DIRECTORY = doc/capi
USE_MDFILE_AS_MAINPAGE = README.md
@@ -49,6 +49,12 @@ EXTRACT_ALL = NO
# Document MRB_INLINE functions
EXTRACT_STATIC = YES
+JAVADOC_AUTOBRIEF = YES
+QT_AUTOBRIEF = NO
+
+QUIET = YES
+WARN_IF_UNDOCUMENTED = NO
+
#===========================================================================
# BELOW THIS LINE IS CRUFT GENERATED BY doxygen -g
# If you edit anything below this, bring it up here so its easier to read.
@@ -174,22 +180,6 @@ STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
-# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
-# first line (until the first dot) of a Javadoc-style comment as the brief
-# description. If set to NO, the Javadoc-style will behave just like regular Qt-
-# style comments (thus requiring an explicit @brief command for a brief
-# description.)
-# The default value is: NO.
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
-# line (until the first dot) of a Qt-style comment as the brief description. If
-# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
-# requiring an explicit \brief command for a brief description.)
-# The default value is: NO.
-
-QT_AUTOBRIEF = NO
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
@@ -711,12 +701,6 @@ CITE_BIB_FILES =
# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
-# The QUIET tag can be used to turn on/off the messages that are generated to
-# standard output by doxygen. If QUIET is set to YES this implies that the
-# messages are off.
-# The default value is: NO.
-
-QUIET = NO
# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
@@ -727,12 +711,6 @@ QUIET = NO
WARNINGS = YES
-# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
-# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
-# will automatically be disabled.
-# The default value is: YES.
-
-WARN_IF_UNDOCUMENTED = YES
# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
# potential errors in the documentation, such as not documenting some parameters
diff --git a/Makefile b/Makefile
index 191e07a93..4912f17e1 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,6 @@
# We provide a minimalistic version called minirake inside of our
# codebase.
--include Makefile.doc
-
RAKE = ruby ./minirake
all :
@@ -14,6 +12,6 @@ test : all
$(RAKE) test
.PHONY : test
-clean : docsclean
+clean :
$(RAKE) clean
.PHONY : clean
diff --git a/Makefile.doc b/Makefile.doc
deleted file mode 100644
index 02bfa55d6..000000000
--- a/Makefile.doc
+++ /dev/null
@@ -1,15 +0,0 @@
-SRCS=$(shell find src -name '*.c')
-HEADERS=$(shell find include -name '*.h')
-MDDOCS=$(shell find doc -name '*.md')
-
-doxygen : Doxyfile $(SRCS) $(HEADERS) $(MDDOCS)
- doxygen Doxyfile
-
-docs : doxygen
-
-docserver : docs
- firefox doxygen/html/index.html
-
-docsclean :
- rm -rf doxygen
-.PHONY : docserver docsclean
diff --git a/Rakefile b/Rakefile
index 079b1a41b..28e2d75c8 100644
--- a/Rakefile
+++ b/Rakefile
@@ -30,6 +30,7 @@ load "#{MRUBY_ROOT}/tasks/libmruby.rake"
load "#{MRUBY_ROOT}/tasks/benchmark.rake"
load "#{MRUBY_ROOT}/tasks/gitlab.rake"
+load "#{MRUBY_ROOT}/tasks/doc.rake"
def install_D(src, dst)
opts = { :verbose => $verbose }
@@ -150,19 +151,9 @@ task :clean do
end
desc "clean everything!"
-task :deep_clean => ["clean"] do
+task :deep_clean => ["clean", "clean_doc"] do
MRuby.each_target do |t|
FileUtils.rm_rf t.gem_clone_dir, { :verbose => $verbose }
end
puts "Cleaned up mrbgems build folder"
end
-
-desc 'generate document'
-task :doc do
- begin
- sh "mrbdoc"
- rescue
- puts "ERROR: To generate documents, you should install yard-mruby gem."
- puts " $ gem install yard-mruby"
- end
-end
diff --git a/include/mruby/value.h b/include/mruby/value.h
index 2ba0b3587..7dd3dbae2 100644
--- a/include/mruby/value.h
+++ b/include/mruby/value.h
@@ -15,16 +15,17 @@
MRB_BEGIN_DECL
/**
+ * mruby Symbol.
* @class mrb_sym
- * @brief mruby Symbol
*
* You can create an mrb_sym by simply using mrb_str_intern() or mrb_intern_cstr()
*/
typedef uint32_t mrb_sym;
/**
+ * mruby Boolean.
* @class mrb_bool
- * @brief mruby Boolean
+ *
*
* Used internally to represent boolean. Can be TRUE or FALSE.
* Not to be confused with Ruby's boolean classes, which can be
diff --git a/tasks/doc.rake b/tasks/doc.rake
new file mode 100644
index 000000000..ab34b33b1
--- /dev/null
+++ b/tasks/doc.rake
@@ -0,0 +1,38 @@
+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