about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-04-26 15:49:01 -0700
committerEric Wong <normalperson@yhbt.net>2010-04-26 16:02:47 -0700
commit6996cdd8d7d36b72d4c1ee30a11969d164ed85e2 (patch)
tree3c5d0dd8fd6033c02ff8f0368c035c4f6e95acde
parentc54df54f6633f3467b64fdfc9cbff278d02397ac (diff)
downloadunicorn-6996cdd8d7d36b72d4c1ee30a11969d164ed85e2.tar.gz
-rw-r--r--Rakefile17
1 files changed, 9 insertions, 8 deletions
diff --git a/Rakefile b/Rakefile
index f2ab994..598852e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -175,16 +175,17 @@ end
 
 # optional rake-compiler support in case somebody needs to cross compile
 begin
-  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"
+    warn "run 'gmake -C ext/unicorn_http clean' and\n" \
+         "remove #{mk} before using rake-compiler"
+  else
+    unless test ?r, "ext/unicorn_http/unicorn_http.c"
+      abort "run 'gmake ragel' or 'make ragel' to generate the Ragel source"
+    end
+    spec = Gem::Specification.load('unicorn.gemspec')
+    require 'rake/extensiontask'
+    Rake::ExtensionTask.new('unicorn_http', spec)
   end
-  Rake::ExtensionTask.new('unicorn_http', spec)
 rescue LoadError
 end