-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathRakefile
52 lines (42 loc) · 1.41 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
# -*- ruby -*-
require 'rubygems'
require 'hoe'
GENERATED_TOKENIZER = "lib/csspool/css/tokenizer.rb"
GENERATED_PARSER = "lib/csspool/css/parser.rb"
Hoe.plugin :git
Hoe.plugin :bundler
Hoe.plugin :gemspec
Hoe.spec('csspool') do
developer('Aaron Patterson', '[email protected]')
developer('John Barnette', '[email protected]')
developer('Jason Barnabe', '[email protected]')
self.readme_file = 'README.md'
self.history_file = 'CHANGELOG.rdoc'
self.extra_rdoc_files = FileList['*.rdoc']
self.licenses = ['MIT']
self.spec_extras[:homepage] = 'https://github.com/sparklemotion/csspool/'
%w{racc rexical hoe-git hoe-gemspec hoe-bundler minitest}.each do |dep|
self.extra_dev_deps << [dep, '>= 0']
end
end
[:test, :check_manifest, "gem:spec"].each do |task_name|
Rake::Task[task_name].prerequisites << :compile
end
task :compile => [GENERATED_TOKENIZER, GENERATED_PARSER]
file GENERATED_TOKENIZER => "lib/csspool/css/tokenizer.rex" do |t|
begin
sh "bundle exec rex -i --independent -o #{t.name} #{t.prerequisites.first}"
rescue
abort "need rexical, sudo gem install rexical"
end
end
file GENERATED_PARSER => "lib/csspool/css/parser.y" do |t|
begin
racc = 'bundle exec racc'
#sh "#{racc} -l -o #{t.name} #{t.prerequisites.first}"
sh "#{racc} -o #{t.name} #{t.prerequisites.first}"
rescue
abort "need racc, sudo gem install racc"
end
end
# vim: syntax=Ruby