about summary refs log tree commit homepage
path: root/Rakefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-29 14:29:56 -0800
committerEric Wong <normalperson@yhbt.net>2009-11-29 14:29:56 -0800
commit65c051d3254f6a7318cbb1ffc319b6ad5eef2f8c (patch)
tree137aba65836078db0dae6a1cb3ddee518df340b9 /Rakefile
parent3cdef34a0beb530b885013530cca239c3e613634 (diff)
downloadunicorn-65c051d3254f6a7318cbb1ffc319b6ad5eef2f8c.tar.gz
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 67534f2..79d95e9 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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