-
Notifications
You must be signed in to change notification settings - Fork 4
/
Rakefile
38 lines (27 loc) · 924 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
# Rakefile for rubydust gem
#
# Ryan W Sims ([email protected])
require 'rake'
require 'rake/clean'
require 'rake/testtask'
# Prevent OS X from including extended attribute junk in the tar output
ENV['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
CLEAN.include("lib/rtc/annot_parser.tab.rb", "lib/rtc/annot_lexer.rex.rb")
desc "Default task"
task :default => :rtc
file "lib/rtc/annot_parser.tab.rb" => "lib/rtc/annot_parser.racc" do
sh "racc lib/rtc/annot_parser.racc"
end
file "lib/rtc/annot_lexer.rex.rb" => "lib/rtc/annot_lexer.rex" do
sh "rex --matcheos lib/rtc/annot_lexer.rex"
end
desc "Generates the lexer from the .rex file"
task :lexer => "lib/rtc/annot_lexer.rex.rb"
desc "Generates the parser from the .racc file"
task :parser => [:lexer,"lib/rtc/annot_parser.tab.rb"]
desc "Builds rtc"
task :rtc => :parser
Rake::TestTask.new do |t|
t.test_files = FileList["test/unit/*.rb"]
end
task :test => :rtc