зеркало из https://github.com/github/ruby.git
rdoc-srcdir: Adjust the version number in the title in .rdoc_options
Other command line options are no longer needed usually.
This commit is contained in:
Родитель
8ba2c3109c
Коммит
02101f473b
|
@ -70,7 +70,6 @@ HTMLOUT = $(EXTOUT)/html
|
|||
CAPIOUT = doc/capi
|
||||
INSTALL_DOC_OPTS = --rdoc-output="$(RDOCOUT)" --html-output="$(HTMLOUT)"
|
||||
RDOC_GEN_OPTS = --no-force-update \
|
||||
--title "Documentation for Ruby $(RUBY_API_VERSION)" \
|
||||
$(empty)
|
||||
|
||||
INITOBJS = dmyext.$(OBJEXT) dmyenc.$(OBJEXT)
|
||||
|
|
|
@ -9,6 +9,12 @@ invoked = Dir.pwd
|
|||
Dir.chdir(File.dirname(__dir__))
|
||||
|
||||
options = RDoc::Options.load_options
|
||||
options.title = options.title.sub(/Ruby \K.*version/) {
|
||||
File.read("include/ruby/version.h")
|
||||
.scan(/^ *# *define +RUBY_API_VERSION_(MAJOR|MINOR) +(\d+)/)
|
||||
.sort # "MAJOR" < "MINOR", fortunately
|
||||
.to_h.values.join(".")
|
||||
}
|
||||
options.parse ARGV
|
||||
|
||||
options.singleton_class.define_method(:finish) do
|
||||
|
|
Загрузка…
Ссылка в новой задаче