2011-11-09 13:46:51 -05:00
|
|
|
#!/usr/bin/env rake
|
2012-05-01 14:53:01 -04:00
|
|
|
require 'bundler/setup'
|
2011-11-09 13:46:51 -05:00
|
|
|
require "bundler/gem_tasks"
|
2011-11-10 11:12:41 -05:00
|
|
|
|
|
|
|
task :clean do
|
2012-05-01 14:53:01 -04:00
|
|
|
sh "rm -rf lib/v8/init.bundle lib/v8/init.so"
|
2011-11-10 11:12:41 -05:00
|
|
|
sh "rm -rf pkg"
|
|
|
|
end
|
|
|
|
|
2012-01-31 16:52:08 -05:00
|
|
|
require "rake/extensiontask"
|
2012-05-01 14:53:01 -04:00
|
|
|
Rake::ExtensionTask.new("init", eval(File.read("therubyracer.gemspec"))) do |ext|
|
2012-01-31 16:52:08 -05:00
|
|
|
ext.ext_dir = "ext/v8"
|
2011-11-10 11:12:41 -05:00
|
|
|
ext.lib_dir = "lib/v8"
|
|
|
|
ext.source_pattern = "*.{cc,h}"
|
|
|
|
end
|
|
|
|
|
2012-01-31 16:52:08 -05:00
|
|
|
require 'rspec/core/rake_task'
|
2011-11-10 11:12:41 -05:00
|
|
|
RSpec::Core::RakeTask.new(:spec)
|
|
|
|
|
2012-01-31 16:52:08 -05:00
|
|
|
task :sanity => [:clean, :compile] do
|
|
|
|
sh %q{ruby -Ilib -e "require 'v8'"}
|
|
|
|
end
|
2011-11-10 11:12:41 -05:00
|
|
|
|
2012-01-31 16:52:08 -05:00
|
|
|
task :default => :spec
|
2011-11-10 11:12:41 -05:00
|
|
|
|