summaryrefslogtreecommitdiff
path: root/tool/rbinstall.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-14 21:24:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-14 21:24:39 +0000
commit68d8a2a47460c488a778d904d6a1591190efe064 (patch)
treec73e49b9aae5384e3649a2b8b299fe414f7e8ca0 /tool/rbinstall.rb
parent6b34fa44aa3962c8d34f838b13602772cb384968 (diff)
* 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
Diffstat (limited to 'tool/rbinstall.rb')
-rwxr-xr-xtool/rbinstall.rb65
1 files changed, 30 insertions, 35 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 9607539..6d27290 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -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?