ruby-changes:8536
From: yugui <ko1@a...>
Date: Fri, 31 Oct 2008 12:31:46 +0900 (JST)
Subject: [ruby-changes:8536] Ruby:r20069 (trunk, ruby_1_9_1): * spec/default.mspec: supports that the build directory != srcdir.
yugui 2008-10-31 12:31:09 +0900 (Fri, 31 Oct 2008) New Revision: 20069 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20069 Log: * spec/default.mspec: supports that the build directory != srcdir. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/spec/default.mspec trunk/ChangeLog trunk/spec/default.mspec Index: ChangeLog =================================================================== --- ChangeLog (revision 20068) +++ ChangeLog (revision 20069) @@ -1,3 +1,7 @@ +Fri Oct 31 12:27:52 2008 Yuki Sonoda (Yugui) <yugui@y...> + + * spec/default.mspec: supports that the build directory != srcdir. + Fri Oct 31 11:35:38 2008 Nobuyoshi Nakada <nobu@r...> * encoding.c (rb_enc_set_default_internal): no alias "internal" if Index: spec/default.mspec =================================================================== --- spec/default.mspec (revision 20068) +++ spec/default.mspec (revision 20069) @@ -7,11 +7,14 @@ spec/rubyspec/1.9/library ] - srcdir = File.expand_path(File.join(File.dirname(__FILE__), '..')) - config = proc{|name| `#{srcdir}/miniruby -I#{srcdir} -rrbconfig -e 'print Config::CONFIG["#{name}"]'`} + builddir = File.expand_path(File.join(File.dirname(__FILE__), '..')) + srcdir = ENV['SRCDIR'] + srcdir ||= $1 if File.read("#{builddir}/Makefile")[/^\s*srcdir\s*=\s*(.+)/i] + srcdir ||= builddir + config = proc{|name| `#{builddir}/miniruby -I#{srcdir} -rrbconfig -e 'print Config::CONFIG["#{name}"]'`} # The default implementation to run the specs. - set :target, File.join(srcdir, "miniruby#{config['exeext']}") + set :target, File.join(builddir, "miniruby#{config['exeext']}") set :flags, %W[ -I#{srcdir}/lib -I#{srcdir}/#{config['EXTOUT']}/common Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 20068) +++ ruby_1_9_1/ChangeLog (revision 20069) @@ -1,3 +1,7 @@ +Fri Oct 31 12:27:52 2008 Yuki Sonoda (Yugui) <yugui@y...> + + * spec/default.mspec: supports that the build directory != srcdir. + Thu Oct 30 23:32:17 2008 Yuki Sonoda (Yugui) <yugui@y...> * test/test_delegate.rb (test_syscallerror_eq): ignored because the Index: ruby_1_9_1/spec/default.mspec =================================================================== --- ruby_1_9_1/spec/default.mspec (revision 20068) +++ ruby_1_9_1/spec/default.mspec (revision 20069) @@ -7,11 +7,14 @@ spec/rubyspec/1.9/library ] - srcdir = File.expand_path(File.join(File.dirname(__FILE__), '..')) - config = proc{|name| `#{srcdir}/miniruby -I#{srcdir} -rrbconfig -e 'print Config::CONFIG["#{name}"]'`} + builddir = File.expand_path(File.join(File.dirname(__FILE__), '..')) + srcdir = ENV['SRCDIR'] + srcdir ||= $1 if File.read("#{builddir}/Makefile")[/^\s*srcdir\s*=\s*(.+)/i] + srcdir ||= builddir + config = proc{|name| `#{builddir}/miniruby -I#{srcdir} -rrbconfig -e 'print Config::CONFIG["#{name}"]'`} # The default implementation to run the specs. - set :target, File.join(srcdir, "miniruby#{config['exeext']}") + set :target, File.join(builddir, "miniruby#{config['exeext']}") set :flags, %W[ -I#{srcdir}/lib -I#{srcdir}/#{config['EXTOUT']}/common -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/