diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-01 13:30:25 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-01 13:30:25 +0000 |
commit | feaf9261d284ddcbab4072c1b5b75a9182ec9381 (patch) | |
tree | e6c7737db6de5fddd1ba573d56a1e2c46346c0f5 /spec | |
parent | 529e6066dde17be015ed8baa54e41a9e6fc801f7 (diff) | |
download | ruby-feaf9261d284ddcbab4072c1b5b75a9182ec9381.tar.gz ruby-feaf9261d284ddcbab4072c1b5b75a9182ec9381.tar.xz ruby-feaf9261d284ddcbab4072c1b5b75a9182ec9381.zip |
* spec/default.mspec: fix for builddir != srcdir
* Makefile.in: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/default.mspec | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/default.mspec b/spec/default.mspec index b94807d6d..50cc6b092 100644 --- a/spec/default.mspec +++ b/spec/default.mspec @@ -1,14 +1,17 @@ load File.dirname(__FILE__) + '/rubyspec/ruby.1.9.mspec' class MSpecScript - builddir = File.expand_path(File.join(File.dirname(__FILE__), '..')) + builddir = Dir.pwd srcdir = ENV['SRCDIR'] - srcdir ||= $1 if File.read("#{builddir}/Makefile")[/^\s*srcdir\s*=\s*(.+)/i] - srcdir ||= builddir + if !srcdir and File.exist?("#{builddir}/Makefile") then + File.open("#{builddir}/Makefile", "r:US-ASCII") {|f| + f.read[/^\s*srcdir\s*=\s*(.+)/i] and srcdir = $1 + } + end config = proc{|name| `#{builddir}/miniruby -I#{srcdir} -rrbconfig -e 'print Config::CONFIG["#{name}"]'`} # The default implementation to run the specs. set :target, File.join(builddir, "miniruby#{config['exeext']}") - set :prefix, 'spec/rubyspec' + set :prefix, File.expand_path('rubyspec', File.dirname(__FILE__)) set :flags, %W[ -I#{srcdir}/lib -I#{srcdir}/#{config['EXTOUT']}/common |