From a72784e43450694969191d8ef8aaea6b53f5768f Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 16 Nov 2005 14:25:53 +0000 Subject: * common.mk (static-ruby): overridable. * ext/extmk.rb (parse_args): force to link extensions statically only if static is given for extstatic. * ext/extmk.rb (RUBY, RUBYW): overridable. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/extmk.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ext') diff --git a/ext/extmk.rb b/ext/extmk.rb index 1642012db..1b0222a1e 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -218,8 +218,7 @@ def parse_args() if ($extstatic = v) == false $extstatic = [] elsif v - $force_static = true - $extstatic.delete("static") + $force_static = true if $extstatic.delete("static") $extstatic = nil if $extstatic.empty? end end @@ -233,6 +232,7 @@ def parse_args() $make = v || 'make' end opts.on('--make-flags=FLAGS', '--mflags', Shellwords) do |v| + v.grep(/\A([-\w]+)=(.*)/) {$configure_args["--#{$1}"] = $2} if arg = v.first arg.insert(0, '-') if /\A[^-][^=]*\Z/ =~ arg end @@ -327,7 +327,7 @@ end for dir in ["ext", File::join($top_srcdir, "ext")] setup = File::join(dir, CONFIG['setup']) if File.file? setup - f = open(setup) + f = open(setup) while line = f.gets() line.chomp! line.sub!(/#.*$/, '') @@ -459,9 +459,11 @@ SRC $mflags.concat(conf) end rubies = [] -%w[RUBY RUBYW].each {|r| +%w[RUBY RUBYW STATIC_RUBY].each {|r| + n = r if r = arg_config("--"+r.downcase) || config_string(r+"_INSTALL_NAME") rubies << r+EXEEXT + $mflags << "#{n}=#{r}" end } -- cgit