Merge commit 'origin/benchmark'
[unicorn.git] / Rakefile
blobbbffdb0a834d23451a7c41dd7f457de3d5e53d3c
2 require 'rubygems'
3 require 'echoe'
5 Echoe.new("unicorn") do |p|
6   p.summary = "A small fast HTTP library and server for Rack applications."
7   p.author = "Eric Wong"
8   p.email = "normalperson@yhbt.net"
9   p.clean_pattern = ['ext/unicorn/http11/*.{bundle,so,o,obj,pdb,lib,def,exp}',
10                      'lib/*.{bundle,so,o,obj,pdb,lib,def,exp}',
11                      'ext/unicorn/http11/Makefile',
12                      'pkg', 'lib/*.bundle', '*.gem',
13                      'site/output', '.config', 'coverage',
14                      'test_*.log', 'log', 'doc']
15   p.url = "http://unicorn.bogomips.org"
16   p.ignore_pattern = /^(pkg|site|projects|doc|log)|CVS|\.log/
17   p.need_tar_gz = false
18   p.need_tgz = true
20   p.extension_pattern = ["ext/**/extconf.rb"]
22   # Eric hasn't bothered to figure out running exec tests properly
23   # from Rake, but Eric prefers GNU make to Rake for tests anyways...
24   p.test_pattern = [ 'test/unit/test*.rb' ]
25 end
27 #### Ragel builder
29 desc "Rebuild the Ragel sources"
30 task :ragel do
31   Dir.chdir "ext/unicorn/http11" do
32     target = "http11_parser.c"
33     File.unlink target if File.exist? target
34     sh "ragel http11_parser.rl -C -G2 -o #{target}"
35     raise "Failed to build C source" unless File.exist? target
36   end
37 end