Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f5a9a911e0
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (25 sloc) 0.661 kb
require 'rspec/core/rake_task'
require 'rbconfig'
RSpec::Core::RakeTask.new(:spec)
def _(path)
File.expand_path('../'+path, __FILE__)
end
file _('lib/akin/grammar.rb') => file(_('lib/akin/grammar.kpeg')) do |t|
cmd = []
if File.file? _('../kpeg/bin/kpeg')
cmd << Config::CONFIG['ruby_install_name']
cmd << '-I' << _('../kpeg/lib')
cmd << _('../kpeg/bin/kpeg')
else
cmd << 'kpeg'
end
cmd << '--stand-alone' << '--force'
cmd << '--output' << t.name
cmd << t.prerequisites.first.to_s
sh *cmd
end
task :clean do
rm_f FileList[_("**/*.rbc")]
end
task :grammar => _('lib/akin/grammar.rb')
task :default => [:grammar, :spec ]
Jump to Line
Something went wrong with that request. Please try again.