зеркало из https://github.com/github/ruby.git
* 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:
Родитель
6b34fa44aa
Коммит
68d8a2a474
|
@ -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>
|
Tue Sep 15 04:25:03 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* configure.in (RDOCTARGET): use install-all. [ruby-dev:39334]
|
* configure.in (RDOCTARGET): use install-all. [ruby-dev:39334]
|
||||||
|
|
11
common.mk
11
common.mk
|
@ -172,8 +172,15 @@ $(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
|
||||||
ruby.imp: $(EXPORTOBJS)
|
ruby.imp: $(EXPORTOBJS)
|
||||||
@$(NM) -Pgp $(EXPORTOBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
|
@$(NM) -Pgp $(EXPORTOBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
|
||||||
|
|
||||||
install: install-nodoc install-$(RDOCTARGET)
|
install: install-$(RDOCTARGET)
|
||||||
install-all: install-nodoc install-doc install-capi
|
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
|
install-nodoc: pre-install-nodoc do-install-nodoc post-install-nodoc
|
||||||
pre-install-nodoc:: pre-install-local pre-install-ext
|
pre-install-nodoc:: pre-install-local pre-install-ext
|
||||||
|
|
|
@ -46,8 +46,7 @@ def parse_args(argv = ARGV)
|
||||||
end
|
end
|
||||||
$mflags.concat(v)
|
$mflags.concat(v)
|
||||||
end
|
end
|
||||||
opt.on('-i', '--install=TYPE',
|
opt.on('-i', '--install=TYPE', $install_procs.keys) do |ins|
|
||||||
[:local, :bin, :"bin-arch", :"bin-comm", :lib, :man, :ext, :"ext-arch", :"ext-comm", :rdoc, :capi]) do |ins|
|
|
||||||
$install << ins
|
$install << ins
|
||||||
end
|
end
|
||||||
opt.on('--data-mode=OCTAL-MODE', OptionParser::OctalInteger) do |mode|
|
opt.on('--data-mode=OCTAL-MODE', OptionParser::OctalInteger) do |mode|
|
||||||
|
@ -78,7 +77,7 @@ def parse_args(argv = ARGV)
|
||||||
else
|
else
|
||||||
raise OptionParser::InvalidArgument, v
|
raise OptionParser::InvalidArgument, v
|
||||||
end
|
end
|
||||||
end rescue abort [$!.message, opt].join("\n")
|
end rescue abort "#{$!.message}\n#{opt.help}"
|
||||||
|
|
||||||
$make, *rest = Shellwords.shellwords($make)
|
$make, *rest = Shellwords.shellwords($make)
|
||||||
$mflags.unshift(*rest) unless rest.empty?
|
$mflags.unshift(*rest) unless rest.empty?
|
||||||
|
@ -118,13 +117,6 @@ def parse_args(argv = ARGV)
|
||||||
$script_mode ||= $prog_mode
|
$script_mode ||= $prog_mode
|
||||||
end
|
end
|
||||||
|
|
||||||
parse_args()
|
|
||||||
|
|
||||||
include FileUtils
|
|
||||||
include FileUtils::NoWrite if $dryrun
|
|
||||||
@fileutils_output = STDOUT
|
|
||||||
@fileutils_label = ''
|
|
||||||
|
|
||||||
$install_procs = Hash.new {[]}
|
$install_procs = Hash.new {[]}
|
||||||
def install?(*types, &block)
|
def install?(*types, &block)
|
||||||
$install_procs[:all] <<= block
|
$install_procs[:all] <<= block
|
||||||
|
@ -282,7 +274,6 @@ ruby_install_name = CONFIG["ruby_install_name"]
|
||||||
rubyw_install_name = CONFIG["rubyw_install_name"]
|
rubyw_install_name = CONFIG["rubyw_install_name"]
|
||||||
goruby_install_name = "go" + ruby_install_name
|
goruby_install_name = "go" + ruby_install_name
|
||||||
|
|
||||||
version = CONFIG["ruby_version"]
|
|
||||||
bindir = CONFIG["bindir"]
|
bindir = CONFIG["bindir"]
|
||||||
libdir = CONFIG["libdir"]
|
libdir = CONFIG["libdir"]
|
||||||
archhdrdir = rubyhdrdir = CONFIG["rubyhdrdir"]
|
archhdrdir = rubyhdrdir = CONFIG["rubyhdrdir"]
|
||||||
|
@ -336,30 +327,27 @@ install?(:local, :arch, :lib) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if $extout
|
|
||||||
extout = "#$extout"
|
|
||||||
install?(:ext, :arch, :'ext-arch') do
|
install?(:ext, :arch, :'ext-arch') do
|
||||||
prepare "extension objects", archlibdir
|
prepare "extension objects", archlibdir
|
||||||
noinst = %w[-*] | (CONFIG["no_install_files"] || "").split
|
noinst = %w[-*] | (CONFIG["no_install_files"] || "").split
|
||||||
install_recursive("#{extout}/#{CONFIG['arch']}", archlibdir, :no_install => noinst, :mode => $prog_mode, :strip => $strip)
|
install_recursive("#{$extout}/#{CONFIG['arch']}", archlibdir, :no_install => noinst, :mode => $prog_mode, :strip => $strip)
|
||||||
prepare "extension objects", sitearchlibdir
|
prepare "extension objects", sitearchlibdir
|
||||||
prepare "extension objects", vendorarchlibdir
|
prepare "extension objects", vendorarchlibdir
|
||||||
end
|
end
|
||||||
install?(:ext, :arch, :'ext-arch') do
|
install?(:ext, :arch, :'ext-arch') do
|
||||||
prepare "extension headers", archhdrdir
|
prepare "extension headers", archhdrdir
|
||||||
install_recursive("#{extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "*.h", :mode => $data_mode)
|
install_recursive("#{$extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "*.h", :mode => $data_mode)
|
||||||
end
|
end
|
||||||
install?(:ext, :comm, :'ext-comm') do
|
install?(:ext, :comm, :'ext-comm') do
|
||||||
prepare "extension scripts", rubylibdir
|
prepare "extension scripts", rubylibdir
|
||||||
install_recursive("#{extout}/common", rubylibdir, :mode => $data_mode)
|
install_recursive("#{$extout}/common", rubylibdir, :mode => $data_mode)
|
||||||
prepare "extension scripts", sitelibdir
|
prepare "extension scripts", sitelibdir
|
||||||
prepare "extension scripts", vendorlibdir
|
prepare "extension scripts", vendorlibdir
|
||||||
end
|
end
|
||||||
install?(:ext, :comm, :'ext-comm') do
|
install?(:ext, :comm, :'ext-comm') do
|
||||||
hdrdir = rubyhdrdir + "/ruby"
|
hdrdir = rubyhdrdir + "/ruby"
|
||||||
prepare "extension headers", hdrdir
|
prepare "extension headers", hdrdir
|
||||||
install_recursive("#{extout}/include/ruby", hdrdir, :glob => "*.h", :mode => $data_mode)
|
install_recursive("#{$extout}/include/ruby", hdrdir, :glob => "*.h", :mode => $data_mode)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
install?(:doc, :rdoc) do
|
install?(:doc, :rdoc) do
|
||||||
|
@ -533,6 +521,13 @@ end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
parse_args()
|
||||||
|
|
||||||
|
include FileUtils
|
||||||
|
include FileUtils::NoWrite if $dryrun
|
||||||
|
@fileutils_output = STDOUT
|
||||||
|
@fileutils_label = ''
|
||||||
|
|
||||||
$install << :local << :ext if $install.empty?
|
$install << :local << :ext if $install.empty?
|
||||||
$install.each do |inst|
|
$install.each do |inst|
|
||||||
if !(procs = $install_procs[inst]) || procs.empty?
|
if !(procs = $install_procs[inst]) || procs.empty?
|
||||||
|
|
Загрузка…
Ссылка в новой задаче