From 496daab2f37436dde375ede903a0778c13de67a4 Mon Sep 17 00:00:00 2001 From: evanweaver Date: Wed, 17 Oct 2007 06:56:33 +0000 Subject: ragel task does java too git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@670 19e92222-5c0b-0410-8929-a290d50e31e9 --- Rakefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Rakefile') 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 -- cgit v1.2.3-24-ge0c7