ruby-changes:52684
From: nobu <ko1@a...>
Date: Tue, 2 Oct 2018 10:56:53 +0900 (JST)
Subject: [ruby-changes:52684] nobu:r64895 (trunk): Install HTML docs if produced
nobu 2018-10-02 10:56:43 +0900 (Tue, 02 Oct 2018) New Revision: 64895 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64895 Log: Install HTML docs if produced Modified files: trunk/common.mk trunk/tool/rbinstall.rb Index: common.mk =================================================================== --- common.mk (revision 64894) +++ common.mk (revision 64895) @@ -61,6 +61,7 @@ ENC_TRANS_D = $(TIMESTAMPDIR)/.enc-tra https://github.com/ruby/ruby/blob/trunk/common.mk#L61 RDOCOUT = $(EXTOUT)/rdoc HTMLOUT = $(EXTOUT)/html CAPIOUT = doc/capi +INSTALL_DOC_OPTS = --rdoc-output="$(RDOCOUT)" --html-output="$(HTMLOUT)" INITOBJS = dmyext.$(OBJEXT) dmyenc.$(OBJEXT) NORMALMAINOBJ = main.$(OBJEXT) @@ -352,7 +353,7 @@ $(ruby_pc): $(srcdir)/template/ruby.pc.i https://github.com/ruby/ruby/blob/trunk/common.mk#L353 install-all: docs pre-install-all do-install-all post-install-all pre-install-all:: all pre-install-local pre-install-ext pre-install-doc do-install-all: pre-install-all - $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=all --rdoc-output="$(RDOCOUT)" + $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=all $(INSTALL_DOC_OPTS) post-install-all:: post-install-local post-install-ext post-install-doc @$(NULLCMD) @@ -434,7 +435,7 @@ what-where-all: no-install-all https://github.com/ruby/ruby/blob/trunk/common.mk#L435 no-install-all: pre-no-install-all dont-install-all post-no-install-all pre-no-install-all:: pre-no-install-local pre-no-install-ext pre-no-install-doc dont-install-all: $(PROGRAM) - $(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=all --rdoc-output="$(RDOCOUT)" + $(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=all $(INSTALL_DOC_OPTS) post-no-install-all:: post-no-install-local post-no-install-ext post-no-install-doc @$(NULLCMD) @@ -521,7 +522,7 @@ post-no-install-man:: https://github.com/ruby/ruby/blob/trunk/common.mk#L522 install-doc: rdoc pre-install-doc do-install-doc post-install-doc pre-install-doc:: install-prereq do-install-doc: $(PROGRAM) pre-install-doc - $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)" + $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc $(INSTALL_DOC_OPTS) post-install-doc:: @$(NULLCMD) @@ -560,7 +561,7 @@ what-where-doc: no-install-doc https://github.com/ruby/ruby/blob/trunk/common.mk#L561 no-install-doc: pre-no-install-doc dont-install-doc post-no-install-doc pre-no-install-doc:: install-prereq dont-install-doc:: $(PREP) - $(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)" + $(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc $(INSTALL_DOC_OPTS) post-no-install-doc:: @$(NULLCMD) Index: tool/rbinstall.rb =================================================================== --- tool/rbinstall.rb (revision 64894) +++ tool/rbinstall.rb (revision 64895) @@ -42,6 +42,7 @@ def parse_args(argv = ARGV) https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L42 $installed_list = nil $dryrun = false $rdocdir = nil + $htmldir = nil $data_mode = 0644 $prog_mode = 0755 $dir_mode = nil @@ -80,6 +81,7 @@ def parse_args(argv = ARGV) https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L81 end opt.on('--installed-list [FILENAME]') {|name| $installed_list = name} opt.on('--rdoc-output [DIR]') {|dir| $rdocdir = dir} + opt.on('--html-output [DIR]') {|dir| $htmldir = dir} opt.on('--cmd-type=TYPE', %w[cmd plain]) {|cmd| $cmdtype = (cmd unless cmd == 'plain')} opt.on('--[no-]strip') {|strip| $strip = strip} @@ -134,6 +136,7 @@ def parse_args(argv = ARGV) https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L136 end $rdocdir ||= $mflags.defined?('RDOCOUT') + $htmldir ||= $mflags.defined?('HTMLOUT') $dir_mode ||= $prog_mode | 0700 $script_mode ||= $prog_mode @@ -421,6 +424,12 @@ install?(:doc, :rdoc) do https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L424 install_recursive($rdocdir, ridatadir, :mode => $data_mode) end end +install?(:doc, :html) do + if $htmldir + prepare "html-docs", docdir + install_recursive($htmldir, docdir+"/html", :mode => $data_mode) + end +end install?(:doc, :capi) do prepare "capi-docs", docdir install_recursive "doc/capi", docdir+"/capi", :mode => $data_mode -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/