2009-12-15 00:35:55 -05:00
|
|
|
require 'rubygems'
|
2010-02-11 17:39:51 -05:00
|
|
|
|
|
|
|
UPSTREAM = "ext/v8/upstream"
|
|
|
|
SCONS = "#{UPSTREAM}/scons"
|
|
|
|
V8_SRC = "#{UPSTREAM}/2.0.6"
|
|
|
|
|
|
|
|
|
2009-12-16 01:40:19 -05:00
|
|
|
begin
|
2010-02-11 17:39:51 -05:00
|
|
|
require 'jeweler'
|
|
|
|
Jeweler::Tasks.new do |gemspec|
|
|
|
|
gemspec.name = gemspec.rubyforge_project = "therubyracer"
|
2010-02-16 21:54:32 -05:00
|
|
|
gemspec.version = "0.5.0"
|
2010-02-11 17:39:51 -05:00
|
|
|
gemspec.summary = "Embed the V8 Javascript interpreter into Ruby"
|
|
|
|
gemspec.description = "Call javascript code and manipulate javascript objects from ruby. Call ruby code and manipulate ruby objects from javascript."
|
|
|
|
gemspec.email = "cowboyd@thefrontside.net"
|
|
|
|
gemspec.homepage = "http://github.com/cowboyd/therubyracer"
|
|
|
|
gemspec.authors = ["Charles Lowell", "Bill Robertson"]
|
|
|
|
gemspec.extra_rdoc_files = ["README.rdoc"]
|
2010-02-16 15:40:05 -05:00
|
|
|
gemspec.files.exclude "ext/**/test/*", "ext/**/samples/*", "ext/**/benchmarks/*", "#{UPSTREAM}/build"
|
2010-02-11 17:39:51 -05:00
|
|
|
end
|
2009-12-16 01:40:19 -05:00
|
|
|
rescue LoadError
|
2010-02-11 17:39:51 -05:00
|
|
|
puts "Jeweler not available. Install it with: gem install jeweler"
|
2009-12-16 01:40:19 -05:00
|
|
|
end
|
2009-12-15 00:35:55 -05:00
|
|
|
|
2010-02-11 17:39:51 -05:00
|
|
|
begin
|
|
|
|
gem 'rake-compiler', '>= 0.4.1'
|
|
|
|
require "rake/extensiontask"
|
2009-12-15 00:35:55 -05:00
|
|
|
|
2010-02-11 17:39:51 -05:00
|
|
|
Rake::ExtensionTask.new("v8", eval("#{Rake.application.jeweler.gemspec.to_ruby}")) do |ext|
|
|
|
|
ext.lib_dir = "lib/v8"
|
|
|
|
ext.source_pattern = "*.{cpp,h}"
|
|
|
|
end
|
|
|
|
rescue LoadError
|
|
|
|
puts "Rake Compiler not available. Install it with: gem install rake-compiler"
|
|
|
|
end
|
2009-12-15 00:35:55 -05:00
|
|
|
|
2010-02-11 17:39:51 -05:00
|
|
|
desc "Build gem"
|
|
|
|
task :gem => :build
|
2009-12-15 00:35:55 -05:00
|
|
|
|
2010-02-11 17:39:51 -05:00
|
|
|
desc "Do not call this, call gem instead."
|
|
|
|
task :build
|
2009-12-15 00:35:55 -05:00
|
|
|
|
2010-01-28 22:37:03 -05:00
|
|
|
|
|
|
|
task "clean-v8" => "clean" do
|
2010-02-16 15:40:05 -05:00
|
|
|
sh "cd #{UPSTREAM} && make clean"
|
2010-01-28 22:37:03 -05:00
|
|
|
end
|
|
|
|
|
2010-02-08 12:23:57 -05:00
|
|
|
task :clean do
|
|
|
|
sh "rm -f ext/v8/Makefile"
|
2010-02-11 17:39:51 -05:00
|
|
|
sh "rm -rf pkg"
|
2010-02-08 12:23:57 -05:00
|
|
|
end
|