2011-01-17 16:01:38 -05:00
|
|
|
require 'bundler'
|
|
|
|
require 'bundler/setup'
|
|
|
|
require "rake/extensiontask"
|
|
|
|
require "rspec/core/rake_task"
|
|
|
|
Bundler::GemHelper.install_tasks
|
2009-12-15 00:35:55 -05:00
|
|
|
|
2010-08-19 11:34:16 -04:00
|
|
|
task :default => :spec
|
|
|
|
|
2010-08-19 11:33:46 -04:00
|
|
|
desc "remove all generated artifacts except built v8 objects"
|
2010-02-08 12:23:57 -05:00
|
|
|
task :clean do
|
2011-01-17 16:01:38 -05:00
|
|
|
sh "rm -rf pkg"
|
2010-06-07 13:08:22 -04:00
|
|
|
sh "rm -rf ext/v8/Makefile"
|
|
|
|
sh "rm -rf ext/v8/*.bundle ext/v8/*.so"
|
2010-05-08 13:21:40 -04:00
|
|
|
sh "rm -rf lib/v8/*.bundle lib/v8/*.so"
|
2010-02-08 12:23:57 -05:00
|
|
|
end
|
2010-03-22 21:57:09 -04:00
|
|
|
|
2010-05-22 20:46:33 -04:00
|
|
|
desc "remove all built v8 objects"
|
|
|
|
task "v8:clean" => "clean" do
|
2011-01-17 16:01:38 -05:00
|
|
|
sh "cd ext/v8/upstream && make clean"
|
2010-05-22 20:46:33 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
desc "build v8 with debugging symbols (much slower)"
|
|
|
|
task "v8:debug" do
|
2011-01-17 16:01:38 -05:00
|
|
|
sh "cd ext/v8/upstream && make debug"
|
2010-03-22 21:57:09 -04:00
|
|
|
end
|
|
|
|
|
2011-01-17 16:01:38 -05:00
|
|
|
Rake::ExtensionTask.new("v8", eval(File.read("therubyracer.gemspec"))) do |ext|
|
|
|
|
ext.lib_dir = "lib/v8"
|
|
|
|
ext.source_pattern = "*.{cpp,h}"
|
2010-03-22 23:37:23 -04:00
|
|
|
end
|
|
|
|
|
2011-01-17 16:01:38 -05:00
|
|
|
RSpec::Core::RakeTask.new(:spec)
|
|
|
|
|
2010-03-22 21:57:09 -04:00
|
|
|
|