2008-12-04 09:06:24 -05:00
|
|
|
load File.dirname(__FILE__) + '/rubyspec/ruby.1.9.mspec'
|
2008-08-04 07:44:41 -04:00
|
|
|
class MSpecScript
|
2008-10-30 23:31:09 -04:00
|
|
|
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}"]'`}
|
2008-08-31 04:31:38 -04:00
|
|
|
|
2008-08-04 07:44:41 -04:00
|
|
|
# The default implementation to run the specs.
|
2008-10-30 23:31:09 -04:00
|
|
|
set :target, File.join(builddir, "miniruby#{config['exeext']}")
|
2008-08-31 04:31:38 -04:00
|
|
|
set :flags, %W[
|
|
|
|
-I#{srcdir}/lib
|
|
|
|
-I#{srcdir}/#{config['EXTOUT']}/common
|
|
|
|
-I#{srcdir}/-
|
|
|
|
-r#{srcdir}/ext/purelib.rb
|
|
|
|
#{srcdir}/runruby.rb --extout=#{config['EXTOUT']}
|
|
|
|
]
|
2008-08-04 07:44:41 -04:00
|
|
|
end
|