about summary refs log tree commit homepage
path: root/Rakefile
diff options
context:
space:
mode:
authorevanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>2007-10-17 06:56:33 +0000
committerevanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>2007-10-17 06:56:33 +0000
commit496daab2f37436dde375ede903a0778c13de67a4 (patch)
tree69011b992816099d494bfe973c2a8ede01dcf911 /Rakefile
parenta7c3afa1c5fcce0e5ac20d775df51c6a8c3d1a0a (diff)
downloadunicorn-496daab2f37436dde375ede903a0778c13de67a4.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@670 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index 4b53bcc..f699c1b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -165,7 +165,18 @@ task :gem_source => [:package_all] do
 end
 
 task :ragel do
-  sh "ragel ext/http11/http11_parser.rl | rlgen-cd -G2 -o ext/http11/http11_parser.c"
+  Dir.chdir "ext/http11" do
+    target = "http11_parser.c"
+    File.unlink target if File.exist? target
+    sh "ragel http11_parser.rl | rlgen-cd -G2 -o #{target}"
+    raise "Failed to build C source" unless File.exist? target
+  end
+  Dir.chdir "ext/http11_java" do
+    target = "org/jruby/mongrel/Http11Parser.java"
+    File.unlink target if File.exist? target
+    sh "ragel -J http11_parser.rl | rlgen-java -o #{target}"
+    raise "Failed to build Java source" unless File.exist? target
+  end
 end
 
 task :site_webgen do