change doc directory and reduce warnings
MODIFY
.gitignore
.gitignore
@@ -31,6 +31,6 @@ tags
/benchmark/*.png
/doc/api
-/doxygen/
+/doc/capi
/src/y.tab.c

MODIFY
Doxyfile
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

MODIFY
Makefile
Makefile
# 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

DELETE
Makefile.doc
-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

MODIFY
Rakefile
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

MODIFY
include/mruby/value.h
include/mruby/value.h
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

ADD
tasks/doc.rake
+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

change doc directory and reduce warnings