forked from yorickpeterse/ruby-ll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
48 lines (39 loc) · 865 Bytes
/
Rakefile
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
require 'bundler'
require 'bundler/gem_tasks'
require 'digest/sha2'
require 'rake/clean'
if Gem.win_platform?
task :devkit do
begin
require 'devkit'
rescue LoadError
warn 'Failed to load devkit, installation might fail'
end
end
task :compile => [:devkit]
end
GEMSPEC = Gem::Specification.load('ruby-ll.gemspec')
if RUBY_PLATFORM == 'java'
require 'rake/javaextensiontask'
Rake::JavaExtensionTask.new('libll', GEMSPEC) do |task|
task.ext_dir = 'ext/java'
end
else
require 'rake/extensiontask'
Rake::ExtensionTask.new('libll', GEMSPEC) do |task|
task.ext_dir = 'ext/c'
end
end
CLEAN.include(
'coverage',
'yardoc',
'lib/libll.*',
'lib/ll/lexer.rb',
'benchmark/parsers/racc/*.rb',
'benchmark/parsers/ll/*.rb',
'tmp'
)
Dir['./task/*.rake'].each do |task|
import(task)
end
task :default => :test