diff options
author | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-16 18:49:26 +0900 |
---|---|---|
committer | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-30 00:39:06 +0900 |
commit | fcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch) | |
tree | 64cb17de3f41a2b6fef2368028fbd00349946994 /jni/ruby/spec/default.mspec |
Fresh start
Diffstat (limited to 'jni/ruby/spec/default.mspec')
-rw-r--r-- | jni/ruby/spec/default.mspec | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/jni/ruby/spec/default.mspec b/jni/ruby/spec/default.mspec new file mode 100644 index 0000000..47f5dd1 --- /dev/null +++ b/jni/ruby/spec/default.mspec @@ -0,0 +1,21 @@ +load File.dirname(__FILE__) + '/rubyspec/default.mspec' +class MSpecScript + builddir = Dir.pwd + srcdir = ENV['SRCDIR'] + 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} -r#{builddir}/rbconfig -e 'print RbConfig::CONFIG["#{name}"]'`} + + # The default implementation to run the specs. + set :target, File.join(builddir, "miniruby#{config['exeext']}") + set :prefix, File.expand_path('rubyspec', File.dirname(__FILE__)) + set :flags, %W[ + -I#{File.expand_path srcdir}/lib + -I#{File.expand_path srcdir}/#{config['EXTOUT']}/common + -I#{File.expand_path srcdir}/- + #{File.expand_path srcdir}/tool/runruby.rb --archdir=#{Dir.pwd} --extout=#{config['EXTOUT']} + ] +end |