FAQ: reorder bit on Rack 1.1.x and Rails 2.3.x
[unicorn.git] / Rakefile
blob37569cee84096aef5b8940bc235fedc1fa8c5d18
1 # optional rake-compiler support in case somebody needs to cross compile
2 begin
3   mk = "ext/unicorn_http/Makefile"
4   if File.readable?(mk)
5     warn "run 'gmake -C ext/unicorn_http clean' and\n" \
6          "remove #{mk} before using rake-compiler"
7   elsif ENV['VERSION']
8     unless File.readable?("ext/unicorn_http/unicorn_http.c")
9       abort "run 'gmake ragel' or 'make ragel' to generate the Ragel source"
10     end
11     spec = Gem::Specification.load('unicorn.gemspec')
12     require 'rake/extensiontask'
13     Rake::ExtensionTask.new('unicorn_http', spec)
14   end
15 rescue LoadError
16 end