Changeset 162 for trunk/Rakefile

Show
Ignore:
Timestamp:
04/08/2008 00:11:36 (4 months ago)
Author:
why
Message:
  • Rakefile: use Ragel 6.1 or greater from now on.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Rakefile

    r159 r162  
    121121desc "Generates the C scanner code with Ragel." 
    122122task :ragel => [:ragel_version] do 
    123   sh %{ragel ext/hpricot_scan/hpricot_scan.rl | #{@ragel_v >= 5.18 ? 'rlgen-cd' : 'rlcodegen'} -G2 -o ext/hpricot_scan/hpricot_scan.c} 
     123  if @ragel_v >= 6.1 
     124    sh %{ragel ext/hpricot_scan/hpricot_scan.rl -G2 -o ext/hpricot_scan/hpricot_scan.c} 
     125  else 
     126    STDERR.puts "Ragel 6.1 or greater is required." 
     127    exit(1) 
     128  end 
    124129end 
    125130 
    126131desc "Generates the Java scanner code with Ragel." 
    127132task :ragel_java => [:ragel_version] do 
    128   sh %{ragel -J ext/hpricot_scan/hpricot_scan.java.rl | #{@ragel_v >= 5.18 ? 'rlgen-java' : 'rlcodegen'} -o  ext/hpricot_scan/HpricotScanService.java} 
     133  if @ragel_v >= 6.1 
     134    sh %{ragel -J ext/hpricot_scan/hpricot_scan.java.rl -G2 -o ext/hpricot_scan/HpricotScanService.java} 
     135  else 
     136    STDERR.puts "Ragel 6.1 or greater is required." 
     137    exit(1) 
     138  end 
    129139end 
    130140