Permalink
Browse files

Readd Rake task for rebuilding the http11 client parser with Ragel

  • Loading branch information...
1 parent 3125033 commit 3c3a76072700aa713ab42b5cccd7d8a1804d48ad Tony Arcieri committed Nov 6, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 Rakefile
View
10 Rakefile
@@ -83,6 +83,16 @@ setup_extension("http11_client", "http11_client")
task :compile => [:rev_ext, :http11_client]
+# Rebuild parser Ragel
+task :http11_parser do
+ Dir.chdir "ext/http11_client" 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
+end
+
CLEAN.include ["build/*", "**/*.o", "**/*.so", "**/*.a", "**/*.log", "pkg"]
CLEAN.include ["ext/**/Makefile", "lib/rev_ext.*", "lib/http11_client.*"]
CLEAN.include ["ext/**/*.#{Config::CONFIG["DLEXT"]}"]

0 comments on commit 3c3a760

Please sign in to comment.