Sha256: 970cff1cd6d7bc56b84889844e3154e360708d6b382c326a1a24a19e59af279b

Contents?: true

Size: 619 Bytes

Versions: 1

Compression:

Stored size: 619 Bytes

Contents

require 'ritual'
require 'rake/testtask'

Rake::TestTask.new do |t|
  t.libs << "test"
  t.test_files = FileList['test/*_test.rb']
  t.verbose = true
end

extension

file 'ext/cast.so' => FileList['ext/*.c', 'ext/yylex.c'] do |t|
  FileUtils.cd 'ext' do
    ruby 'extconf.rb'
    sh 'make'
  end
end

file 'ext/yylex.c' => 'ext/yylex.re' do |t|
  sh "re2c #{t.prerequisites[0]} > #{t.name}"
end

file 'lib/cast/c.tab.rb' => 'lib/cast/c.y' do |t|
  sh "racc #{t.prerequisites[0]}"
end

task :ext => 'ext/yylex.c'
task 'gem:build' => ['ext/yylex.c', 'lib/cast/c.tab.rb']
CLEAN.include('ext/yylex.c', 'lib/cast/c.tab.rb')

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cast-0.2.1 Rakefile