Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 52 lines (41 sloc) 1.542 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
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.4.9"
    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.files.exclude "ext/**/test/*", "ext/**/samples/*", "ext/**/benchmarks/*", "#{UPSTREAM}/build"
  end
rescue LoadError
  puts "Jeweler not available. Install it with: gem install jeweler"
end

begin
  gem 'rake-compiler', '>= 0.4.1'
  require "rake/extensiontask"

  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

desc "Build gem"
task :gem => :build

desc "Do not call this, call gem instead."
task :build


task "clean-v8" => "clean" do
  sh "cd #{UPSTREAM} && make clean"
end

task :clean do
  sh "rm -f ext/v8/Makefile"
  sh "rm -rf pkg"
end
Something went wrong with that request. Please try again.