Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .rdoc_options
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ rdoc_include:
exclude:
- \Alib/irb
- \.gemspec\z
- \.java\z
- \.rbs\z
- \.re\z
- \.yaml\z
- /depend\z
- /bin/console\z
- /bin/setup\z

autolink_excluded_words:
- Class
Expand Down
2 changes: 1 addition & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ LIBRUBY_EXTS = ./.libruby-with-ext.time
REVISION_H = ./.revision.time
PLATFORM_D = $(TIMESTAMPDIR)/.$(PLATFORM_DIR).time
ENC_TRANS_D = $(TIMESTAMPDIR)/.enc-trans.time
RDOC = $(XRUBY) "$(tooldir)/rdoc-srcdir"
RDOC = $(XRUBY) "$(tooldir)/rdoc-srcdir" --bundled-gems gems/bundled_gems .bundle/gems
RDOCOUT = $(EXTOUT)/rdoc
HTMLOUT = $(EXTOUT)/html
CAPIOUT = doc/capi
Expand Down
14 changes: 14 additions & 0 deletions tool/rdoc-srcdir
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ options.title = options.title.sub(/Ruby \K.*version/) {
.sort # "MAJOR" < "MINOR", fortunately
.to_h.values.join(".")
}

if ARGV.first == "--bundled-gems"
_, gems_list, gems_dir = ARGV.shift(3)
gems_dir or abort "usage: #$0 --bundled-gems gems_list gems_dir rdoc-arguments..."
bundles = File.read(gems_list) rescue
abort("#$0: cannot read bundled gems list file: #{gems_list}")
Dir.exist?(gems_dir) or
abort "#$0: extracted gems directory not found: #{gems_dir}"
bundles.scan(/^([^#\s]+)\s+([^#\s]+)/) do |g, v|
d = "#{gems_dir}/#{g}-#{v}/"
ARGV << d if Dir.exist?(d)
end
end

options.parse ARGV

options.singleton_class.define_method(:finish) do
Expand Down