Remove unnecessary separators in help text
[unicorn.git] / Rakefile
blob1d217a26ddc7f80b03b84374df19a1bc272f281a
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.rdoc_pattern = ['README', 'LICENSE', 'CONTRIBUTORS', 'CHANGELOG', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
17   p.ignore_pattern = /^(pkg|site|projects|doc|log)|CVS|\.log/
18   p.need_tar_gz = false
19   p.need_tgz = true
21   p.extension_pattern = ["ext/**/extconf.rb"]
23   # Eric hasn't bothered to figure out running exec tests properly
24   # from Rake, but Eric prefers GNU make to Rake for tests anyways...
25   p.test_pattern = [ 'test/unit/test*.rb' ]
26 end
28 #### Ragel builder
30 desc "Rebuild the Ragel sources"
31 task :ragel do
32   Dir.chdir "ext/unicorn/http11" do
33     target = "http11_parser.c"
34     File.unlink target if File.exist? target
35     sh "ragel http11_parser.rl -C -G2 -o #{target}"
36     raise "Failed to build C source" unless File.exist? target
37   end
38 end
40 #### Pre-compiled extensions for alternative platforms
42 def move_extensions
43   Dir["ext/**/*.#{Config::CONFIG['DLEXT']}"].each { |file| mv file, "lib/" }
44 end