Ticket #66: rakefile_patch_for_ragel_5.18.diff
| File rakefile_patch_for_ragel_5.18.diff, 1.0 kB (added by stepheneb, 21 months ago) |
|---|
-
Rakefile
107 107 cp ext_so, "lib" 108 108 end 109 109 110 desc "returns the ragel version" 111 task :ragel_version do 112 @ragel_v = `ragel -v`[/(version )(\S*)/,2].to_f 113 end 114 110 115 desc "Generates the C scanner code with Ragel." 111 task :ragel do112 sh %{ragel ext/hpricot_scan/hpricot_scan.rl | rlcodegen-G2 -o ext/hpricot_scan/hpricot_scan.c}116 task :ragel => [:ragel_version] do 117 sh %{ragel ext/hpricot_scan/hpricot_scan.rl | #{@ragel_v >= 5.18 ? 'rlgen-cd' : 'rlcodegen'} -G2 -o ext/hpricot_scan/hpricot_scan.c} 113 118 end 114 119 115 120 desc "Generates the Java scanner code with Ragel." 116 task :ragel_java do117 sh %{ragel -J ext/hpricot_scan/hpricot_scan.java.rl | rlcodegen-o ext/hpricot_scan/HpricotScanService.java}121 task :ragel_java => [:ragel_version] do 122 sh %{ragel -J ext/hpricot_scan/hpricot_scan.java.rl | #{@ragel_v >= 5.18 ? 'rlgen-java' : 'rlcodegen'} -o ext/hpricot_scan/HpricotScanService.java} 118 123 end 119 124 120 125 ### Win32 Packages ###
