-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathRakefile
57 lines (48 loc) · 1.18 KB
/
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
49
50
51
52
53
54
55
56
57
#!/usr/bin/env rake
# require "bundler/gem_tasks"
namespace :compiler do
task :spec do
sh "bundle exec mspec -r spec/compiler/spec_helper spec/compiler"
end
end
namespace :melbourne do
def extension_dir
Dir.chdir "ext/rubinius/code/melbourne" do
yield
end
end
desc "Generate the parser"
task :generate do
extension_dir { sh "bison -o grammar.cpp grammar.y" }
end
namespace :spec do
desc "Clean the parser extension"
task :clean do
extension_dir do
sh "rm -f *.o namespace.h *.bundle *.so"
end
end
desc "Build the parser extension"
task :build => :generate do
extension_dir do
ruby "-v extconf.rb"
ruby "-e 'system %[make && make install]'"
end
end
end
desc "Run the specs"
task :spec => %w[spec:clean spec:build] do
ENV['RUBYLIB'] ||= "#{File.join(__dir__, 'lib')}:#{__dir__}"
sh "mspec -r spec/melbourne/spec_helper spec/melbourne"
end
end
namespace :toolset do
task :spec do
sh "bundle exec mspec -r spec/toolset/spec_helper spec/toolset"
end
end
task :spec do
sh "bundle exec rake melbourne:spec"
sh "bundle exec rake toolset:spec"
end
task :default => :spec