summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.mk9
-rwxr-xr-xtool/rbinstall.rb9
2 files changed, 14 insertions, 4 deletions
diff --git a/common.mk b/common.mk
index c15104a..b05f1da 100644
--- a/common.mk
+++ b/common.mk
@@ -61,6 +61,7 @@ ENC_TRANS_D = $(TIMESTAMPDIR)/.enc-trans.time
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.in config.status
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
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::
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
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)
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index a3361e6..5687a68 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -42,6 +42,7 @@ def parse_args(argv = ARGV)
$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)
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)
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
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