* tool/rbinstall.rb (parse_args): show help message and exit if
rbconfig could not load. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
68d8a2a474
commit
3c4380ad25
@ -1,9 +1,12 @@
|
|||||||
Tue Sep 15 06:24:35 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Sep 15 06:42:59 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* common.mk (install-all): target to install all.
|
* common.mk (install-all): target to install all.
|
||||||
|
|
||||||
* tool/rbinstall.rb (parse_args): accept all install targets.
|
* tool/rbinstall.rb (parse_args): accept all install targets.
|
||||||
|
|
||||||
|
* tool/rbinstall.rb (parse_args): show help message and exit if
|
||||||
|
rbconfig could not load.
|
||||||
|
|
||||||
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]
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
#!./miniruby
|
#!./miniruby
|
||||||
|
|
||||||
load "./rbconfig.rb"
|
begin
|
||||||
include RbConfig
|
load "./rbconfig.rb"
|
||||||
$".unshift File.expand_path("./rbconfig.rb")
|
rescue LoadError
|
||||||
|
CONFIG = Hash.new {""}
|
||||||
|
else
|
||||||
|
include RbConfig
|
||||||
|
$".unshift File.expand_path("./rbconfig.rb")
|
||||||
|
end
|
||||||
|
|
||||||
srcdir = File.expand_path('../..', __FILE__)
|
srcdir = File.expand_path('../..', __FILE__)
|
||||||
unless defined?(CROSS_COMPILING) and CROSS_COMPILING
|
unless defined?(CROSS_COMPILING) and CROSS_COMPILING
|
||||||
@ -35,7 +40,7 @@ def parse_args(argv = ARGV)
|
|||||||
$cmdtype = ('bat' if File::ALT_SEPARATOR == '\\')
|
$cmdtype = ('bat' if File::ALT_SEPARATOR == '\\')
|
||||||
mflags = []
|
mflags = []
|
||||||
opt = OptionParser.new
|
opt = OptionParser.new
|
||||||
opt.on('-n') {$dryrun = true}
|
opt.on('-n', '--dry-run') {$dryrun = true}
|
||||||
opt.on('--dest-dir=DIR') {|dir| $destdir = dir}
|
opt.on('--dest-dir=DIR') {|dir| $destdir = dir}
|
||||||
opt.on('--extout=DIR') {|dir| $extout = (dir unless dir.empty?)}
|
opt.on('--extout=DIR') {|dir| $extout = (dir unless dir.empty?)}
|
||||||
opt.on('--make=COMMAND') {|make| $make = make}
|
opt.on('--make=COMMAND') {|make| $make = make}
|
||||||
@ -79,6 +84,11 @@ def parse_args(argv = ARGV)
|
|||||||
end
|
end
|
||||||
end rescue abort "#{$!.message}\n#{opt.help}"
|
end rescue abort "#{$!.message}\n#{opt.help}"
|
||||||
|
|
||||||
|
unless defined?(RbConfig)
|
||||||
|
puts opt.help
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
$make, *rest = Shellwords.shellwords($make)
|
$make, *rest = Shellwords.shellwords($make)
|
||||||
$mflags.unshift(*rest) unless rest.empty?
|
$mflags.unshift(*rest) unless rest.empty?
|
||||||
$mflags.unshift(*mflags)
|
$mflags.unshift(*mflags)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user