1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/Rakefile

59 lines
1.7 KiB
Text
Raw Normal View History

2009-12-15 00:35:55 -05:00
require 'rubygems'
UPSTREAM = "ext/v8/upstream"
SCONS = "#{UPSTREAM}/scons"
V8_SRC = "#{UPSTREAM}/2.0.6"
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = gemspec.rubyforge_project = "therubyracer"
gemspec.version = "0.5.4"
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"]
gemspec.require_paths << "ext"
gemspec.files.exclude "ext/**/test/*", "ext/**/samples/*", "ext/**/benchmarks/*", "#{UPSTREAM}/build"
end
rescue LoadError
puts "Jeweler not available. Install it with: gem install jeweler"
end
2009-12-15 00:35:55 -05:00
begin
gem 'rake-compiler', '>= 0.4.1'
require "rake/extensiontask"
2009-12-15 00:35:55 -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
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
end
desc "Build gem"
task :gem => :build
2009-12-15 00:35:55 -05:00
desc "Do not call this, call gem instead."
task :build
2009-12-15 00:35:55 -05:00
task "clean-v8" => "clean" do
sh "cd #{UPSTREAM} && make clean"
end
2010-02-08 12:23:57 -05:00
task :clean do
sh "rm -f ext/v8/Makefile"
sh "rm -rf pkg"
2010-02-08 12:23:57 -05:00
end