mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* common.mk (no-install): not install rdoc actually.
* common.mk (install-doc, no-install-doc): use instruby.rb. * instruby.rb: rdoc installation. * ext/extmk.rb: expand ruby executable names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f5ec2b0d75
commit
e8454ae776
4 changed files with 47 additions and 14 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Thu Sep 21 22:56:20 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* common.mk (no-install): not install rdoc actually.
|
||||
|
||||
* common.mk (install-doc, no-install-doc): use instruby.rb.
|
||||
|
||||
* instruby.rb: rdoc installation.
|
||||
|
||||
* ext/extmk.rb: expand ruby executable names.
|
||||
|
||||
Thu Sep 21 17:44:49 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* string.c (rb_str_startwith): a new method to check if a string
|
||||
|
|
16
common.mk
16
common.mk
|
@ -153,7 +153,7 @@ do-install-man:
|
|||
post-install-man::
|
||||
|
||||
what-where: no-install
|
||||
no-install: no-install-nodoc $(RDOCTARGET)
|
||||
no-install: no-install-nodoc no-install-doc
|
||||
what-where-all: no-install-all
|
||||
no-install-all: no-install-nodoc
|
||||
|
||||
|
@ -228,17 +228,21 @@ dont-install-man:
|
|||
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)
|
||||
$(RUNRUBY) -run -e cp -- -p -r -v "$(RDOCOUT)" "$(RIDATADIR)"
|
||||
$(MINIRUBY) $(srcdir)/instruby.rb $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)"
|
||||
post-install-doc::
|
||||
|
||||
rdoc: $(PROGRAM) PHONY
|
||||
@echo Generating RDoc documentation
|
||||
$(RUNRUBY) "$(srcdir)/bin/rdoc" --all --ri --op "$(RDOCOUT)" "$(srcdir)"
|
||||
|
||||
pre-install-doc:: PHONY
|
||||
$(RUNRUBY) -run -e mkdir -- -p "$(RIDATADIR)"
|
||||
|
||||
post-install-doc:: PHONY
|
||||
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::
|
||||
$(MINIRUBY) $(srcdir)/instruby.rb -n $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)"
|
||||
post-no-install-doc::
|
||||
|
||||
install-prereq:
|
||||
@exit > $(INSTALLED_LIST)
|
||||
|
|
|
@ -487,7 +487,7 @@ rubies = []
|
|||
%w[RUBY RUBYW STATIC_RUBY].each {|r|
|
||||
n = r
|
||||
if r = arg_config("--"+r.downcase) || config_string(r+"_INSTALL_NAME")
|
||||
rubies << r+EXEEXT
|
||||
rubies << Config.expand(r+=EXEEXT)
|
||||
$mflags << "#{n}=#{r}"
|
||||
end
|
||||
}
|
||||
|
|
33
instruby.rb
33
instruby.rb
|
@ -37,11 +37,11 @@ def parse_args()
|
|||
$mflags.concat(v)
|
||||
end
|
||||
opt.on('-i', '--install=TYPE',
|
||||
[:local, :bin, :lib, :man, :ext, :"ext-arch", :"ext-comm"]) do |ins|
|
||||
[:local, :bin, :lib, :man, :ext, :"ext-arch", :"ext-comm", :rdoc]) do |ins|
|
||||
$install << ins
|
||||
end
|
||||
opt.on('--installed-list [FILENAME]') {|name| $installed_list = name}
|
||||
opt.on('--rdoc-output') {|dir| $rdocdir = dir}
|
||||
opt.on('--rdoc-output [DIR]') {|dir| $rdocdir = dir}
|
||||
|
||||
opt.parse! rescue abort [$!.message, opt].join("\n")
|
||||
|
||||
|
@ -81,7 +81,6 @@ end
|
|||
|
||||
parse_args()
|
||||
|
||||
include FileUtils::Verbose
|
||||
include FileUtils::NoWrite if $dryrun
|
||||
@fileutils_output = STDOUT
|
||||
@fileutils_label = ''
|
||||
|
@ -115,10 +114,11 @@ def makedirs(dirs)
|
|||
realdir = with_destdir(dir)
|
||||
realdir unless $made_dirs.fetch(dir) do
|
||||
$made_dirs[dir] = true
|
||||
$installed_list.puts(File.join(dir, "")) if $installed_list
|
||||
File.directory?(realdir)
|
||||
end
|
||||
end.compact!
|
||||
super(dirs, :mode => 0755, :verbose => true) unless dirs.empty?
|
||||
super(dirs, :mode => 0755) unless dirs.empty?
|
||||
end
|
||||
|
||||
def install_recursive(src, dest, options = {})
|
||||
|
@ -169,6 +169,8 @@ lib = CONFIG["LIBRUBY"]
|
|||
arc = CONFIG["LIBRUBY_A"]
|
||||
|
||||
install?(:local, :arch, :bin) do
|
||||
puts "installing binary commands"
|
||||
|
||||
makedirs [bindir, libdir, archlibdir]
|
||||
|
||||
install ruby_install_name+exeext, bindir, :mode => 0755
|
||||
|
@ -198,6 +200,7 @@ end
|
|||
if $extout
|
||||
extout = "#$extout"
|
||||
install?(:ext, :arch, :'ext-arch') do
|
||||
puts "installing extension objects"
|
||||
makedirs [archlibdir, sitearchlibdir]
|
||||
if noinst = CONFIG["no_install_files"] and noinst.empty?
|
||||
noinst = nil
|
||||
|
@ -205,6 +208,7 @@ if $extout
|
|||
install_recursive("#{extout}/#{CONFIG['arch']}", archlibdir, :no_install => noinst)
|
||||
end
|
||||
install?(:ext, :comm, :'ext-comm') do
|
||||
puts "installing extension scripts"
|
||||
makedirs [rubylibdir, sitelibdir]
|
||||
install_recursive("#{extout}/common", rubylibdir)
|
||||
end
|
||||
|
@ -212,7 +216,9 @@ end
|
|||
|
||||
install?(:rdoc) do
|
||||
if $rdocdir
|
||||
ridatadir = File.join(Config['datadir'], 'ri/$(MAJOR).$(MINOR)/system')
|
||||
puts "installing rdoc"
|
||||
|
||||
ridatadir = File.join(CONFIG['datadir'], 'ri/$(MAJOR).$(MINOR)/system')
|
||||
Config.expand(ridatadir)
|
||||
makedirs [ridatadir]
|
||||
install_recursive($rdocdir, ridatadir)
|
||||
|
@ -220,6 +226,8 @@ install?(:rdoc) do
|
|||
end
|
||||
|
||||
install?(:local, :comm, :bin) do
|
||||
puts "installing command scripts"
|
||||
|
||||
Dir.chdir srcdir
|
||||
makedirs [bindir, rubylibdir]
|
||||
|
||||
|
@ -269,15 +277,24 @@ EOF
|
|||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
install?(:local, :comm, :lib) do
|
||||
puts "installing library scripts"
|
||||
|
||||
Dir.chdir srcdir
|
||||
makedirs [rubylibdir]
|
||||
|
||||
for f in Dir["lib/**/*{.rb,help-message}"]
|
||||
dir = File.dirname(f).sub!(/\Alib/, rubylibdir) || rubylibdir
|
||||
makedirs dir
|
||||
install f, dir, :mode => 0644
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
install?(:local, :arch, :lib) do
|
||||
puts "installing headers"
|
||||
|
||||
install?(:local, :arch, :bin) do
|
||||
Dir.chdir(srcdir)
|
||||
makedirs [archlibdir]
|
||||
for f in Dir["*.h"]
|
||||
|
@ -292,6 +309,8 @@ EOF
|
|||
end
|
||||
|
||||
install?(:local, :comm, :man) do
|
||||
puts "installing manpages"
|
||||
|
||||
Dir.chdir(srcdir)
|
||||
for mdoc in Dir["*.[1-9]"]
|
||||
next unless File.file?(mdoc) and open(mdoc){|fh| fh.read(1) == '.'}
|
||||
|
|
Loading…
Add table
Reference in a new issue