mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* Doxyfile.in: new file. Template of a configuration file for
Doxygen. Intorduces C-level API reference generation with Doxygen. * tool/file2lastrev.rb: wrapper script that abstracts subversion and git-svn. * tool/strip-rdoc.rb: filter for preventing doxygen from processing rdoc comments. * configure.in: (Doxyfile): Doxyfile is generated together with Makefile. (PACKAGE): configuration $(PACKAGE) is necessary for $(docdir). * instruby.rb: adds a new install target 'capi' * common.mk (capi): new target that generates C API documents with Doxygen. (install-capi): new target. (pre-install-capi): ditto. (do-install-capi): ditto. (post-install-capi): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a550f2992b
commit
c09e5abeee
8 changed files with 409 additions and 3 deletions
24
ChangeLog
24
ChangeLog
|
@ -1,3 +1,27 @@
|
||||||
|
Mon Dec 22 15:56:49 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
||||||
|
|
||||||
|
* Doxyfile.in: new file. Template of a configuration file.
|
||||||
|
Introduces C-level API reference generation with Doxygen.
|
||||||
|
|
||||||
|
* tool/file2lastrev.rb: wrapper script that abstracts subversion
|
||||||
|
and git-svn.
|
||||||
|
|
||||||
|
* tool/strip-rdoc.rb: filter for preventing doxygen from processing
|
||||||
|
rdoc comments.
|
||||||
|
|
||||||
|
* configure.in: (Doxyfile): Doxyfile is generated together with
|
||||||
|
Makefile.
|
||||||
|
(PACKAGE): configuration $(PACKAGE) is necessary for $(docdir).
|
||||||
|
|
||||||
|
* instruby.rb: adds a new install target 'capi'
|
||||||
|
|
||||||
|
* common.mk (capi): new target that generates C API documents with
|
||||||
|
Doxygen.
|
||||||
|
(install-capi): new target.
|
||||||
|
(pre-install-capi): ditto.
|
||||||
|
(do-install-capi): ditto.
|
||||||
|
(post-install-capi): ditto.
|
||||||
|
|
||||||
Mon Dec 22 21:31:11 2008 Tanaka Akira <akr@fsij.org>
|
Mon Dec 22 21:31:11 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* numeric.c (int_ord): Integer#ord implemented.
|
* numeric.c (int_ord): Integer#ord implemented.
|
||||||
|
|
251
Doxyfile.in
Normal file
251
Doxyfile.in
Normal file
|
@ -0,0 +1,251 @@
|
||||||
|
# Doxyfile 1.5.7
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Project related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
DOXYFILE_ENCODING = UTF-8
|
||||||
|
PROJECT_NAME = Ruby
|
||||||
|
PROJECT_NUMBER = @MAJOR@.@MINOR@.@TEENY@
|
||||||
|
OUTPUT_DIRECTORY = doc/capi
|
||||||
|
CREATE_SUBDIRS = NO
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF =
|
||||||
|
ALWAYS_DETAILED_SEC = YES
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = YES
|
||||||
|
STRIP_FROM_PATH = @srcdir@
|
||||||
|
STRIP_FROM_INC_PATH =
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = YES
|
||||||
|
QT_AUTOBRIEF = NO
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
|
TAB_SIZE = 8
|
||||||
|
ALIASES =
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
BUILTIN_STL_SUPPORT = NO
|
||||||
|
CPP_CLI_SUPPORT = NO
|
||||||
|
SIP_SUPPORT = NO
|
||||||
|
IDL_PROPERTY_SUPPORT = NO
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
TYPEDEF_HIDES_STRUCT = NO
|
||||||
|
SYMBOL_CACHE_SIZE = 0
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Build related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
EXTRACT_ALL = YES
|
||||||
|
EXTRACT_PRIVATE = NO
|
||||||
|
EXTRACT_STATIC = YES
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
|
EXTRACT_ANON_NSPACES = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = YES
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = NO
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_GROUP_NAMES = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
ENABLED_SECTIONS =
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
SHOW_DIRECTORIES = NO
|
||||||
|
SHOW_FILES = YES
|
||||||
|
SHOW_NAMESPACES = YES
|
||||||
|
FILE_VERSION_FILTER = "./miniruby@EXEEXT@ -I @srcdir@/lib @srcdir@/tool/file2lastrev.rb -q"
|
||||||
|
LAYOUT_FILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
QUIET = NO
|
||||||
|
WARNINGS = YES
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_NO_PARAMDOC = NO
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
WARN_LOGFILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
INPUT = @srcdir@
|
||||||
|
INPUT_ENCODING = UTF-8
|
||||||
|
FILE_PATTERNS = *.c *.h *.y
|
||||||
|
RECURSIVE = YES
|
||||||
|
EXCLUDE = newline.c
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXCLUDE_PATTERNS = *.src doc build tmp test yarvtest lib bootstraptest spec .ext .git .svn
|
||||||
|
EXCLUDE_SYMBOLS =
|
||||||
|
EXAMPLE_PATH =
|
||||||
|
EXAMPLE_PATTERNS =
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
IMAGE_PATH =
|
||||||
|
INPUT_FILTER = "./miniruby@EXEEXT@ -I @srcdir@/lib @srcdir@/tool/strip-rdoc.rb"
|
||||||
|
FILTER_PATTERNS =
|
||||||
|
FILTER_SOURCE_FILES = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SOURCE_BROWSER = NO
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = NO
|
||||||
|
REFERENCES_RELATION = NO
|
||||||
|
REFERENCES_LINK_SOURCE = YES
|
||||||
|
USE_HTAGS = NO
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
IGNORE_PREFIX =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_HEADER =
|
||||||
|
HTML_FOOTER =
|
||||||
|
HTML_STYLESHEET =
|
||||||
|
HTML_ALIGN_MEMBERS = YES
|
||||||
|
HTML_DYNAMIC_SECTIONS = NO
|
||||||
|
GENERATE_DOCSET = NO
|
||||||
|
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||||
|
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
CHM_FILE =
|
||||||
|
HHC_LOCATION =
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
CHM_INDEX_ENCODING =
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
GENERATE_QHP = NO
|
||||||
|
QCH_FILE =
|
||||||
|
QHP_NAMESPACE = org.doxygen.Project
|
||||||
|
QHP_VIRTUAL_FOLDER = doc
|
||||||
|
QHG_LOCATION =
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
GENERATE_TREEVIEW = NONE
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
FORMULA_FONTSIZE = 10
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the LaTeX output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_LATEX = NO
|
||||||
|
LATEX_OUTPUT = latex
|
||||||
|
LATEX_CMD_NAME = latex
|
||||||
|
MAKEINDEX_CMD_NAME = makeindex
|
||||||
|
COMPACT_LATEX = NO
|
||||||
|
PAPER_TYPE = a4wide
|
||||||
|
EXTRA_PACKAGES =
|
||||||
|
LATEX_HEADER =
|
||||||
|
PDF_HYPERLINKS = YES
|
||||||
|
USE_PDFLATEX = YES
|
||||||
|
LATEX_BATCHMODE = NO
|
||||||
|
LATEX_HIDE_INDICES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the RTF output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_RTF = NO
|
||||||
|
RTF_OUTPUT = rtf
|
||||||
|
COMPACT_RTF = NO
|
||||||
|
RTF_HYPERLINKS = NO
|
||||||
|
RTF_STYLESHEET_FILE =
|
||||||
|
RTF_EXTENSIONS_FILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the man page output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_MAN = NO
|
||||||
|
MAN_OUTPUT = man
|
||||||
|
MAN_EXTENSION = .3
|
||||||
|
MAN_LINKS = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the XML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_XML = NO
|
||||||
|
XML_OUTPUT = xml
|
||||||
|
XML_SCHEMA =
|
||||||
|
XML_DTD =
|
||||||
|
XML_PROGRAMLISTING = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options for the AutoGen Definitions output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_AUTOGEN_DEF = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the Perl module output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_PERLMOD = NO
|
||||||
|
PERLMOD_LATEX = NO
|
||||||
|
PERLMOD_PRETTY = YES
|
||||||
|
PERLMOD_MAKEVAR_PREFIX =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
INCLUDE_PATH =
|
||||||
|
INCLUDE_FILE_PATTERNS =
|
||||||
|
PREDEFINED =
|
||||||
|
EXPAND_AS_DEFINED =
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::additions related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
TAGFILES =
|
||||||
|
GENERATE_TAGFILE =
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
CLASS_DIAGRAMS = NO
|
||||||
|
MSCGEN_PATH =
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
HAVE_DOT = NO
|
||||||
|
DOT_FONTNAME = FreeSans
|
||||||
|
DOT_FONTPATH =
|
||||||
|
CLASS_GRAPH = NO
|
||||||
|
COLLABORATION_GRAPH = NO
|
||||||
|
GROUP_GRAPHS = YES
|
||||||
|
UML_LOOK = NO
|
||||||
|
TEMPLATE_RELATIONS = NO
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
CALLER_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = NO
|
||||||
|
DIRECTORY_GRAPH = NO
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
DOT_PATH =
|
||||||
|
DOTFILE_DIRS =
|
||||||
|
DOT_GRAPH_MAX_NODES = 50
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 0
|
||||||
|
DOT_TRANSPARENT = NO
|
||||||
|
DOT_MULTI_TARGETS = NO
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::additions related to the search engine
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SEARCHENGINE = NO
|
|
@ -164,6 +164,9 @@ fake.rb: Makefile
|
||||||
' > $@
|
' > $@
|
||||||
|
|
||||||
Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in
|
Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in
|
||||||
|
Doxyfile: $(srcdir)/Doxyfile.in config.status
|
||||||
|
MAKE=$(MAKE) $(SHELL) ./config.status
|
||||||
|
|
||||||
|
|
||||||
$(MKFILES): config.status
|
$(MKFILES): config.status
|
||||||
MAKE=$(MAKE) $(SHELL) ./config.status
|
MAKE=$(MAKE) $(SHELL) ./config.status
|
||||||
|
|
12
common.mk
12
common.mk
|
@ -138,6 +138,9 @@ miniruby$(EXEEXT): config.status $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DM
|
||||||
GORUBY = go$(RUBY_INSTALL_NAME)
|
GORUBY = go$(RUBY_INSTALL_NAME)
|
||||||
golf: $(LIBRUBY) $(GOLFOBJS)
|
golf: $(LIBRUBY) $(GOLFOBJS)
|
||||||
$(MAKE) $(MFLAGS) MAINOBJ="$(GOLFOBJS)" PROGRAM=$(GORUBY)$(EXEEXT) program
|
$(MAKE) $(MFLAGS) MAINOBJ="$(GOLFOBJS)" PROGRAM=$(GORUBY)$(EXEEXT) program
|
||||||
|
capi: Doxyfile PHONY
|
||||||
|
@$(MAKEDIRS) doc/capi
|
||||||
|
@doxygen
|
||||||
|
|
||||||
program: $(PROGRAM)
|
program: $(PROGRAM)
|
||||||
|
|
||||||
|
@ -158,7 +161,7 @@ ruby.imp: $(COMMONOBJS)
|
||||||
@$(NM) -Pgp $(COMMONOBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
|
@$(NM) -Pgp $(COMMONOBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
|
||||||
|
|
||||||
install: install-nodoc $(RDOCTARGET)
|
install: install-nodoc $(RDOCTARGET)
|
||||||
install-all: install-nodoc install-doc
|
install-all: install-nodoc install-doc install-capi
|
||||||
|
|
||||||
install-nodoc: pre-install-nodoc do-install-nodoc post-install-nodoc
|
install-nodoc: pre-install-nodoc do-install-nodoc post-install-nodoc
|
||||||
pre-install-nodoc:: pre-install-local pre-install-ext
|
pre-install-nodoc:: pre-install-local pre-install-ext
|
||||||
|
@ -225,6 +228,13 @@ do-install-man: $(PREP)
|
||||||
post-install-man::
|
post-install-man::
|
||||||
@$(NULLCMD)
|
@$(NULLCMD)
|
||||||
|
|
||||||
|
install-capi: capi pre-install-capi do-install-capi post-install-capi
|
||||||
|
pre-install-capi:: install-prereq
|
||||||
|
do-install-capi: $(PREP)
|
||||||
|
$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=capi
|
||||||
|
post-install-capi::
|
||||||
|
@$(NULLCMD)
|
||||||
|
|
||||||
what-where: no-install
|
what-where: no-install
|
||||||
no-install: no-install-nodoc no-install-doc
|
no-install: no-install-nodoc no-install-doc
|
||||||
what-where-all: no-install-all
|
what-where-all: no-install-all
|
||||||
|
|
|
@ -2132,6 +2132,10 @@ done
|
||||||
AC_SUBST(BUILTIN_TRANSSRCS)
|
AC_SUBST(BUILTIN_TRANSSRCS)
|
||||||
AC_SUBST(BUILTIN_TRANSOBJS)
|
AC_SUBST(BUILTIN_TRANSOBJS)
|
||||||
|
|
||||||
|
PACKAGE=$RUBY_INSTALL_NAME
|
||||||
|
AC_SUBST(PACKAGE)
|
||||||
|
|
||||||
|
AC_CONFIG_FILES(Doxyfile)
|
||||||
AC_CONFIG_FILES($FIRSTMAKEFILE)
|
AC_CONFIG_FILES($FIRSTMAKEFILE)
|
||||||
AC_CONFIG_FILES(Makefile, [{
|
AC_CONFIG_FILES(Makefile, [{
|
||||||
sed '/^MISSING/s/\$U\././g' Makefile
|
sed '/^MISSING/s/\$U\././g' Makefile
|
||||||
|
|
12
instruby.rb
12
instruby.rb
|
@ -45,7 +45,7 @@ def parse_args(argv = ARGV)
|
||||||
$mflags.concat(v)
|
$mflags.concat(v)
|
||||||
end
|
end
|
||||||
opt.on('-i', '--install=TYPE',
|
opt.on('-i', '--install=TYPE',
|
||||||
[:local, :bin, :"bin-arch", :"bin-comm", :lib, :man, :ext, :"ext-arch", :"ext-comm", :rdoc]) do |ins|
|
[:local, :bin, :"bin-arch", :"bin-comm", :lib, :man, :ext, :"ext-arch", :"ext-comm", :rdoc, :capi]) do |ins|
|
||||||
$install << ins
|
$install << ins
|
||||||
end
|
end
|
||||||
opt.on('--data-mode=OCTAL-MODE', OptionParser::OctalInteger) do |mode|
|
opt.on('--data-mode=OCTAL-MODE', OptionParser::OctalInteger) do |mode|
|
||||||
|
@ -221,6 +221,7 @@ sitearchlibdir = CONFIG["sitearchdir"]
|
||||||
vendorlibdir = CONFIG["vendorlibdir"]
|
vendorlibdir = CONFIG["vendorlibdir"]
|
||||||
vendorarchlibdir = CONFIG["vendorarchdir"]
|
vendorarchlibdir = CONFIG["vendorarchdir"]
|
||||||
mandir = File.join(CONFIG["mandir"], "man")
|
mandir = File.join(CONFIG["mandir"], "man")
|
||||||
|
capidir = CONFIG["docdir"]
|
||||||
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
|
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
|
||||||
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
|
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
|
||||||
dll = CONFIG["LIBRUBY_SO"]
|
dll = CONFIG["LIBRUBY_SO"]
|
||||||
|
@ -278,7 +279,7 @@ if $extout
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
install?(:rdoc) do
|
install?(:doc, :rdoc) do
|
||||||
if $rdocdir
|
if $rdocdir
|
||||||
puts "installing rdoc"
|
puts "installing rdoc"
|
||||||
|
|
||||||
|
@ -288,6 +289,13 @@ install?(:rdoc) do
|
||||||
install_recursive($rdocdir, ridatadir, :mode => $data_mode)
|
install_recursive($rdocdir, ridatadir, :mode => $data_mode)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
install?(:doc, :capi) do
|
||||||
|
puts "installing capi-docs"
|
||||||
|
|
||||||
|
makedirs [capidir]
|
||||||
|
Dir.chdir("doc")
|
||||||
|
install_recursive "capi", capidir, :mode => $data_mode
|
||||||
|
end
|
||||||
|
|
||||||
install?(:local, :comm, :bin, :'bin-comm') do
|
install?(:local, :comm, :bin, :'bin-comm') do
|
||||||
puts "installing command scripts"
|
puts "installing command scripts"
|
||||||
|
|
84
tool/file2lastrev.rb
Normal file
84
tool/file2lastrev.rb
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
require 'optparse'
|
||||||
|
require 'pathname'
|
||||||
|
|
||||||
|
class VCSNotFoundError < RuntimeError; end
|
||||||
|
|
||||||
|
def detect_vcs(path)
|
||||||
|
target_path = Pathname(File.expand_path(path))
|
||||||
|
|
||||||
|
path = target_path.directory? ? target_path : target_path.parent
|
||||||
|
begin
|
||||||
|
return :svn, target_path.relative_path_from(path) if File.directory?("#{path}/.svn")
|
||||||
|
return :git, target_path.relative_path_from(path) if File.directory?("#{path}/.git")
|
||||||
|
path, orig = path.parent, path
|
||||||
|
end until path == orig
|
||||||
|
raise VCSNotFoundError, "does not seem to be under a vcs"
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_revisions(path)
|
||||||
|
ENV['LANG'] = ENV['LC_ALL'] = ENV['LC_MESSAGES'] = 'C'
|
||||||
|
vcs, path = detect_vcs(path)
|
||||||
|
|
||||||
|
info = case vcs
|
||||||
|
when :svn
|
||||||
|
`svn info #{path}`
|
||||||
|
when :git
|
||||||
|
`git svn info #{path}`
|
||||||
|
end
|
||||||
|
|
||||||
|
if info =~ /^Revision: (\d+)$/
|
||||||
|
last = $1
|
||||||
|
else
|
||||||
|
raise "last revision not found"
|
||||||
|
end
|
||||||
|
if info =~ /^Last Changed Rev: (\d+)$/
|
||||||
|
changed = $1
|
||||||
|
else
|
||||||
|
raise "changed revision not found"
|
||||||
|
end
|
||||||
|
|
||||||
|
return last, changed
|
||||||
|
end
|
||||||
|
|
||||||
|
def raise_if_conflict
|
||||||
|
raise "you can specify only one of --changed, --revision.h and --doxygen" if $output
|
||||||
|
end
|
||||||
|
|
||||||
|
parser = OptionParser.new {|opts|
|
||||||
|
opts.on("--changed", "changed rev") do
|
||||||
|
raise_if_conflict
|
||||||
|
$output = :changed
|
||||||
|
end
|
||||||
|
opts.on("--revision.h") do
|
||||||
|
raise_if_conflict
|
||||||
|
$output = :revision_h
|
||||||
|
end
|
||||||
|
opts.on("--doxygen") do
|
||||||
|
raise_if_conflict
|
||||||
|
$output = :doxygen
|
||||||
|
end
|
||||||
|
opts.on("-q", "--suppress_not_found") do
|
||||||
|
$suppress_not_found = true
|
||||||
|
end
|
||||||
|
}
|
||||||
|
parser.parse!
|
||||||
|
|
||||||
|
|
||||||
|
begin
|
||||||
|
last, changed = get_revisions(ARGV.shift)
|
||||||
|
rescue VCSNotFoundError
|
||||||
|
raise unless $suppress_not_found
|
||||||
|
end
|
||||||
|
|
||||||
|
case $output
|
||||||
|
when :changed, nil
|
||||||
|
puts changed
|
||||||
|
when :revision_h
|
||||||
|
puts "#define RUBY_REVISION #{changed}"
|
||||||
|
when :doxygen
|
||||||
|
puts "r#{changed}/r#{last}"
|
||||||
|
else
|
||||||
|
raise "unknown output format `#{$output}'"
|
||||||
|
end
|
22
tool/strip-rdoc.rb
Normal file
22
tool/strip-rdoc.rb
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#!ruby
|
||||||
|
|
||||||
|
source = ARGF.read
|
||||||
|
source = source.gsub(%r{/\*\*((?!\*/).+?)\*/}m) do |comment|
|
||||||
|
comment = $1
|
||||||
|
next "/**#{comment}*/" unless /^\s*\*\s?\-\-\s*$/ =~ comment
|
||||||
|
doxybody = nil
|
||||||
|
comment.each_line do |line|
|
||||||
|
if doxybody
|
||||||
|
if /^\s*\*\s?\+\+\s*$/ =~ line
|
||||||
|
break
|
||||||
|
end
|
||||||
|
doxybody << line
|
||||||
|
else
|
||||||
|
if /^\s*\*\s?--\s*$/ =~ line
|
||||||
|
doxybody = "\n"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
"/**#{doxybody}*/"
|
||||||
|
end
|
||||||
|
print source
|
Loading…
Reference in a new issue