2009-12-15 00:35:55 -05:00
|
|
|
require 'rubygems'
|
2010-02-11 17:39:51 -05:00
|
|
|
|
|
|
|
UPSTREAM = "ext/v8/upstream"
|
|
|
|
|
2010-03-22 21:57:09 -04:00
|
|
|
manifest = Rake::FileList.new("**/*")
|
2010-06-16 07:08:45 -04:00
|
|
|
manifest.exclude "lib/v8/*.bundle", "lib/v8/*.so", "ext/**/test/*", "ext/**/test/*", "ext/**/samples/*", "ext/**/benchmarks/*", "#{UPSTREAM}/build", "tmp", "tmp/**/*", "**/*.gem"
|
2010-03-22 21:57:09 -04:00
|
|
|
Gem::Specification.new do |gemspec|
|
|
|
|
$gemspec = gemspec
|
|
|
|
gemspec.name = gemspec.rubyforge_project = "therubyracer"
|
2010-06-16 07:08:45 -04:00
|
|
|
gemspec.version = "0.7.3"
|
2010-03-22 21:57:09 -04: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"]
|
|
|
|
gemspec.executables = ["therubyracer", "v8"]
|
|
|
|
gemspec.extensions = ["ext/v8/extconf.rb"]
|
2010-06-02 09:14:48 -04:00
|
|
|
gemspec.require_paths = ["lib", "ext", "contrib"]
|
2010-03-22 21:57:09 -04:00
|
|
|
gemspec.files = manifest.to_a
|
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
|
|
|
desc "Build gem"
|
2010-05-08 13:21:40 -04:00
|
|
|
task :gem => :gemspec do
|
2010-03-22 21:57:09 -04:00
|
|
|
Gem::Builder.new($gemspec).build
|
|
|
|
end
|
2010-01-28 22:37:03 -05:00
|
|
|
|
2010-03-22 21:57:09 -04:00
|
|
|
desc "build the gemspec"
|
2010-05-08 13:21:40 -04:00
|
|
|
task :gemspec => :clean do
|
2010-03-22 21:57:09 -04:00
|
|
|
File.open("#{$gemspec.name}.gemspec", "w") do |f|
|
|
|
|
f.write($gemspec.to_ruby)
|
|
|
|
end
|
2010-01-28 22:37:03 -05:00
|
|
|
end
|
|
|
|
|
2010-02-08 12:23:57 -05:00
|
|
|
task :clean do
|
2010-02-11 17:39:51 -05:00
|
|
|
sh "rm -rf pkg"
|
2010-03-23 00:15:59 -04:00
|
|
|
sh "rm -rf *.gem"
|
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
|
|
|
|
sh "cd #{UPSTREAM} && make clean"
|
|
|
|
end
|
|
|
|
|
|
|
|
desc "build v8 with debugging symbols (much slower)"
|
|
|
|
task "v8:debug" do
|
|
|
|
sh "cd #{UPSTREAM} && make debug"
|
2010-03-22 21:57:09 -04:00
|
|
|
end
|
|
|
|
|
2010-03-22 23:37:23 -04:00
|
|
|
for file in Dir['tasks/*.rake']
|
|
|
|
load file
|
|
|
|
end
|
|
|
|
|
2010-03-22 21:57:09 -04:00
|
|
|
|