mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/extmk.rb (extmake): skip uncompiled extensions.
* lib/mkmf.rb (create_makefile): emit no rules for static library if $static is nil, e.g., outside of ext/. * lib/test/unit/ui/console/testrunner.rb (test_started): show test name via $0. * runruby.rb: set environments to use the compiled binary. * test/runner.rb: do nothing while cross-compiling. * test/drb/drbtest.rb, test/soap/calc/test_calc_cgi.rb: use envutil to know ruby binary. * test/ruby/envutil.rb: give priority to RUBY environment variable to use just compiled binary and libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4732bf25f5
commit
fa7a5d5477
9 changed files with 40 additions and 16 deletions
20
ChangeLog
20
ChangeLog
|
@ -1,3 +1,23 @@
|
|||
Thu Apr 8 19:45:08 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/extmk.rb (extmake): skip uncompiled extensions.
|
||||
|
||||
* lib/mkmf.rb (create_makefile): emit no rules for static library if
|
||||
$static is nil, e.g., outside of ext/.
|
||||
|
||||
* lib/test/unit/ui/console/testrunner.rb (test_started): show test
|
||||
name via $0.
|
||||
|
||||
* runruby.rb: set environments to use the compiled binary.
|
||||
|
||||
* test/runner.rb: do nothing while cross-compiling.
|
||||
|
||||
* test/drb/drbtest.rb, test/soap/calc/test_calc_cgi.rb: use envutil to
|
||||
know ruby binary.
|
||||
|
||||
* test/ruby/envutil.rb: give priority to RUBY environment variable to
|
||||
use just compiled binary and libraries.
|
||||
|
||||
Thu Apr 8 19:03:33 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* io.c (rb_io_binmode): inverted condition. [ruby-dev:23349]
|
||||
|
|
|
@ -103,6 +103,8 @@ def extmake(target)
|
|||
else
|
||||
if $static
|
||||
m = File.read(makefile)
|
||||
$target = m[/^TARGET[ \s]*=[ \s]*(\S*)/, 1] or $static = nil
|
||||
/^STATIC_LIB[ \t]*=[ \t]*\S+/ =~ m or $static = nil
|
||||
$preload = Shellwords.shellwords(m[/^preload[ \t]*=[ \t]*(.*)/, 1] || "")
|
||||
$DLDFLAGS += " " + (m[/^DLDFLAGS[ \t]*=[ \t]*(.*)/, 1] || "")
|
||||
if s = m[/^LIBS[ \t]*=[ \t]*(.*)/, 1]
|
||||
|
|
12
lib/mkmf.rb
12
lib/mkmf.rb
|
@ -884,7 +884,7 @@ LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS}
|
|||
OBJS = #{$objs}
|
||||
TARGET = #{target}
|
||||
DLLIB = #{dllib}
|
||||
STATIC_LIB = #{staticlib}
|
||||
STATIC_LIB = #{staticlib unless $static.nil?}
|
||||
}
|
||||
if $extout
|
||||
mfile.print %{
|
||||
|
@ -976,10 +976,12 @@ site-install-rb: install-rb
|
|||
mfile.print "@-$(RM) $@\n\t"
|
||||
mfile.print "@-$(MAKEDIRS) $(@D)\n\t"
|
||||
mfile.print LINK_SO, "\n\n"
|
||||
mfile.print "$(STATIC_LIB): $(OBJS)\n\t"
|
||||
mfile.print "$(AR) #{config_string('ARFLAGS') || 'cru '}$@ $(OBJS)"
|
||||
if ranlib = config_string('RANLIB')
|
||||
mfile.print "\n\t@-#{ranlib} $(DLLIB) 2> /dev/null || true"
|
||||
unless $static.nil?
|
||||
mfile.print "$(STATIC_LIB): $(OBJS)\n\t"
|
||||
mfile.print "$(AR) #{config_string('ARFLAGS') || 'cru '}$@ $(OBJS)"
|
||||
config_string('RANLIB') do |ranlib|
|
||||
mfile.print "\n\t@-#{ranlib} $(DLLIB) 2> /dev/null || true"
|
||||
end
|
||||
end
|
||||
mfile.print "\n\n"
|
||||
if makedef
|
||||
|
|
|
@ -90,6 +90,7 @@ module Test
|
|||
end
|
||||
|
||||
def test_started(name)
|
||||
$0 = $0.sub(/(?:\0.*)?\z/) {"\0"+name}
|
||||
output_single(name + ": ", VERBOSE)
|
||||
end
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ if extout
|
|||
libs << abs_extout << File.expand_path(RUBY_PLATFORM, abs_extout)
|
||||
end
|
||||
config["bindir"] = abs_archdir
|
||||
ENV["RUBY"] = File.expand_path(ruby)
|
||||
ENV["PATH"] = [abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR)
|
||||
|
||||
if e = ENV["RUBYLIB"]
|
||||
libs |= e.split(File::PATH_SEPARATOR)
|
||||
|
|
|
@ -2,14 +2,12 @@ require 'test/unit'
|
|||
require 'drb/drb'
|
||||
require 'drb/extservm'
|
||||
require 'timeout'
|
||||
require 'rbconfig'
|
||||
$:.replace($: | [File.expand_path("../ruby", File.dirname(__FILE__))])
|
||||
require 'envutil'
|
||||
|
||||
class DRbService
|
||||
@@manager = DRb::ExtServManager.new
|
||||
@@ruby = File.join(
|
||||
Config::CONFIG["bindir"],
|
||||
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"]
|
||||
)
|
||||
@@ruby = EnvUtil.rubybin
|
||||
@@ruby += " -d" if $DEBUG
|
||||
@@dir = File.dirname(File.expand_path(__FILE__))
|
||||
def self.manager
|
||||
|
|
|
@ -9,6 +9,7 @@ module EnvUtil
|
|||
end
|
||||
begin
|
||||
require "rbconfig"
|
||||
ENV["RUBY"] or
|
||||
File.join(
|
||||
Config::CONFIG["bindir"],
|
||||
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
exit if defined?(CROSS_COMPILING)
|
||||
require 'test/unit'
|
||||
|
||||
rcsid = %w$Id$
|
||||
|
|
|
@ -2,7 +2,8 @@ require 'test/unit'
|
|||
require 'soap/rpc/driver'
|
||||
require 'logger'
|
||||
require 'webrick'
|
||||
require 'rbconfig'
|
||||
$:.replace($: | [File.expand_path("../ruby", File.dirname(__FILE__))])
|
||||
require 'envutil'
|
||||
|
||||
|
||||
module SOAP
|
||||
|
@ -10,11 +11,7 @@ module Calc
|
|||
|
||||
|
||||
class TestCalcCGI < Test::Unit::TestCase
|
||||
# This test shuld be run after installing ruby.
|
||||
RUBYBIN = File.join(
|
||||
Config::CONFIG["bindir"],
|
||||
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"]
|
||||
)
|
||||
RUBYBIN = EnvUtil.rubybin
|
||||
RUBYBIN << " -d" if $DEBUG
|
||||
|
||||
Port = 17171
|
||||
|
|
Loading…
Reference in a new issue