* common.mk (install-all): target to install all.

* tool/rbinstall.rb (parse_args): accept all install targets.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-09-14 21:24:39 +00:00
Родитель 6b34fa44aa
Коммит 68d8a2a474
3 изменённых файлов: 45 добавлений и 37 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Tue Sep 15 06:24:35 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* common.mk (install-all): target to install all.
* tool/rbinstall.rb (parse_args): accept all install targets.
Tue Sep 15 04:25:03 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (RDOCTARGET): use install-all. [ruby-dev:39334]

Просмотреть файл

@ -172,8 +172,15 @@ $(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
ruby.imp: $(EXPORTOBJS)
@$(NM) -Pgp $(EXPORTOBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
install: install-nodoc install-$(RDOCTARGET)
install-all: install-nodoc install-doc install-capi
install: install-$(RDOCTARGET)
doc-all: rdoc capi
install-all: doc-all pre-install-all do-install-all post-install-all
pre-install-all:: install-prereq
do-install-all: $(PROGRAM)
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=all --rdoc-output="$(RDOCOUT)"
post-install-all::
@$(NULLCMD)
install-nodoc: pre-install-nodoc do-install-nodoc post-install-nodoc
pre-install-nodoc:: pre-install-local pre-install-ext

Просмотреть файл

@ -46,8 +46,7 @@ def parse_args(argv = ARGV)
end
$mflags.concat(v)
end
opt.on('-i', '--install=TYPE',
[:local, :bin, :"bin-arch", :"bin-comm", :lib, :man, :ext, :"ext-arch", :"ext-comm", :rdoc, :capi]) do |ins|
opt.on('-i', '--install=TYPE', $install_procs.keys) do |ins|
$install << ins
end
opt.on('--data-mode=OCTAL-MODE', OptionParser::OctalInteger) do |mode|
@ -78,7 +77,7 @@ def parse_args(argv = ARGV)
else
raise OptionParser::InvalidArgument, v
end
end rescue abort [$!.message, opt].join("\n")
end rescue abort "#{$!.message}\n#{opt.help}"
$make, *rest = Shellwords.shellwords($make)
$mflags.unshift(*rest) unless rest.empty?
@ -118,13 +117,6 @@ def parse_args(argv = ARGV)
$script_mode ||= $prog_mode
end
parse_args()
include FileUtils
include FileUtils::NoWrite if $dryrun
@fileutils_output = STDOUT
@fileutils_label = ''
$install_procs = Hash.new {[]}
def install?(*types, &block)
$install_procs[:all] <<= block
@ -282,7 +274,6 @@ ruby_install_name = CONFIG["ruby_install_name"]
rubyw_install_name = CONFIG["rubyw_install_name"]
goruby_install_name = "go" + ruby_install_name
version = CONFIG["ruby_version"]
bindir = CONFIG["bindir"]
libdir = CONFIG["libdir"]
archhdrdir = rubyhdrdir = CONFIG["rubyhdrdir"]
@ -336,30 +327,27 @@ install?(:local, :arch, :lib) do
end
end
if $extout
extout = "#$extout"
install?(:ext, :arch, :'ext-arch') do
prepare "extension objects", archlibdir
noinst = %w[-*] | (CONFIG["no_install_files"] || "").split
install_recursive("#{extout}/#{CONFIG['arch']}", archlibdir, :no_install => noinst, :mode => $prog_mode, :strip => $strip)
prepare "extension objects", sitearchlibdir
prepare "extension objects", vendorarchlibdir
end
install?(:ext, :arch, :'ext-arch') do
prepare "extension headers", archhdrdir
install_recursive("#{extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "*.h", :mode => $data_mode)
end
install?(:ext, :comm, :'ext-comm') do
prepare "extension scripts", rubylibdir
install_recursive("#{extout}/common", rubylibdir, :mode => $data_mode)
prepare "extension scripts", sitelibdir
prepare "extension scripts", vendorlibdir
end
install?(:ext, :comm, :'ext-comm') do
hdrdir = rubyhdrdir + "/ruby"
prepare "extension headers", hdrdir
install_recursive("#{extout}/include/ruby", hdrdir, :glob => "*.h", :mode => $data_mode)
end
install?(:ext, :arch, :'ext-arch') do
prepare "extension objects", archlibdir
noinst = %w[-*] | (CONFIG["no_install_files"] || "").split
install_recursive("#{$extout}/#{CONFIG['arch']}", archlibdir, :no_install => noinst, :mode => $prog_mode, :strip => $strip)
prepare "extension objects", sitearchlibdir
prepare "extension objects", vendorarchlibdir
end
install?(:ext, :arch, :'ext-arch') do
prepare "extension headers", archhdrdir
install_recursive("#{$extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "*.h", :mode => $data_mode)
end
install?(:ext, :comm, :'ext-comm') do
prepare "extension scripts", rubylibdir
install_recursive("#{$extout}/common", rubylibdir, :mode => $data_mode)
prepare "extension scripts", sitelibdir
prepare "extension scripts", vendorlibdir
end
install?(:ext, :comm, :'ext-comm') do
hdrdir = rubyhdrdir + "/ruby"
prepare "extension headers", hdrdir
install_recursive("#{$extout}/include/ruby", hdrdir, :glob => "*.h", :mode => $data_mode)
end
install?(:doc, :rdoc) do
@ -533,6 +521,13 @@ end
end
end
parse_args()
include FileUtils
include FileUtils::NoWrite if $dryrun
@fileutils_output = STDOUT
@fileutils_label = ''
$install << :local << :ext if $install.empty?
$install.each do |inst|
if !(procs = $install_procs[inst]) || procs.empty?