Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 32 lines (25 sloc) 0.661 kb
5e8f2dd @vic kpeg parser.
authored
1 require 'rspec/core/rake_task'
2 require 'rbconfig'
3
4 RSpec::Core::RakeTask.new(:spec)
5
6 def _(path)
7 File.expand_path('../'+path, __FILE__)
8 end
9
10 file _('lib/akin/grammar.rb') => file(_('lib/akin/grammar.kpeg')) do |t|
11 cmd = []
12 if File.file? _('../kpeg/bin/kpeg')
13 cmd << Config::CONFIG['ruby_install_name']
14 cmd << '-I' << _('../kpeg/lib')
15 cmd << _('../kpeg/bin/kpeg')
16 else
17 cmd << 'kpeg'
18 end
19 cmd << '--stand-alone' << '--force'
20 cmd << '--output' << t.name
21 cmd << t.prerequisites.first.to_s
22 sh *cmd
23 end
24
f5a9a91 @vic Added rake clean task to remove all rbc files.
authored
25 task :clean do
26 rm_f FileList[_("**/*.rbc")]
27 end
28
5e8f2dd @vic kpeg parser.
authored
29 task :grammar => _('lib/akin/grammar.rb')
30
31 task :default => [:grammar, :spec ]
Something went wrong with that request. Please try again.