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
|
# -*- ruby -*-
require 'rubygems'
require 'hoe'
require './inline.rb'
Hoe.new("RubyInline", Inline::VERSION) do |p|
p.summary = "Multi-language extension coding within ruby."
p.description = p.paragraphs_of("README.txt", 3).join
p.changes = p.paragraphs_of("History.txt", 0..1).join
p.clean_globs << File.expand_path("~/.ruby_inline")
p.spec_extras[:requirements] = "A POSIX environment and a compiler for your language."
p.spec_extras[:require_paths] = ["."]
p.lib_files = %w(inline.rb)
p.test_files = %w(test_inline.rb)
p.bin_files = %w(inline_package)
end
task :examples do
%w(example.rb example2.rb tutorial/example1.rb tutorial/example2.rb).each do |e|
rm_rf '~/.ruby_inline'
ruby "-I. -w #{e}"
end
end
task :bench do
verbose(false) do
puts "Running native"
ruby "-I. ./example.rb 3"
puts "Running primer - preloads the compiler and stuff"
rm_rf '~/.ruby_inline'
ruby "-I. ./example.rb 0"
puts "With full builds"
(0..2).each do |i|
rm_rf '~/.ruby_inline'
ruby "-I. ./example.rb #{i}"
end
puts "Without builds"
(0..2).each do |i|
ruby "-I. ./example.rb #{i}"
end
end
end
|