diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-29 14:29:56 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-29 14:29:56 -0800 |
commit | 65c051d3254f6a7318cbb1ffc319b6ad5eef2f8c (patch) | |
tree | 137aba65836078db0dae6a1cb3ddee518df340b9 /Rakefile | |
parent | 3cdef34a0beb530b885013530cca239c3e613634 (diff) | |
download | unicorn-65c051d3254f6a7318cbb1ffc319b6ad5eef2f8c.tar.gz |
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -143,3 +143,20 @@ task :raa_update do p res puts res.body end + +# optional rake-compiler support in case somebody needs to cross compile +begin + require 'rubygems' + spec = Gem::Specification.load('unicorn.gemspec') + require 'rake/extensiontask' + unless test ?r, "ext/unicorn_http/unicorn_http.c" + abort "run 'gmake ragel' or 'make ragel' to generate the Ragel source" + end + mk = "ext/unicorn_http/Makefile" + if test ?r, mk + abort "run 'gmake -C ext/unicorn_http clean' and " \ + "remove #{mk} before using rake-compiler" + end + Rake::ExtensionTask.new('unicorn_http', spec) +rescue LoadError +end |