-
Notifications
You must be signed in to change notification settings - Fork 5
/
Rakefile
46 lines (35 loc) · 1006 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
file "lib/tp_plus/parser.rb" => ["generators/parser.y"] do |t|
sh "racc -l -t -v -o lib/tp_plus/parser.rb generators/parser.y"
end
namespace :compile do
task :parser do
Rake::Task["lib/tp_plus/parser.rb"].invoke
end
end
require 'rdoc/task'
RDoc::Task.new do |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.main = "README.md"
rdoc.rdoc_files.include("README.md", "examples.md")
rdoc.rdoc_files.include("test/tp_plus/*.rb")
rdoc.rdoc_files.include("lib/tp_plus/*.rb", "lib/tp_plus/nodes/*.rb")
rdoc.rdoc_files.exclude("lib/tp_plus/parser.rb")
end
task compile: ["compile:parser"]
require 'rake/testtask'
Rake::TestTask.new do |t|
# build the parser if necessary
Rake::Task["lib/tp_plus/parser.rb"].invoke
t.libs << "test"
t.test_files = FileList['test/**/test_*.rb']
t.verbose = true
end
task default: :test
desc "Run the TP+ benchmark"
task :benchmark do
ruby "./performance/benchmark.rb"
end
desc "Run the TP+ profiler"
task :profile do
ruby "./performance/profile.rb"
end