Sha256: 1f2f60bd104d7b8df616c1d0d4731e56f42cc0bd0bcfe2082f2fd21e49491721

Contents?: true

Size: 1.31 KB

Versions: 1

Compression:

Stored size: 1.31 KB

Contents

# -*- coding: utf-8 -*-

require 'rubygems'
require 'rake/extensiontask'
require 'hoe'
require 'pp'
$root = File.dirname(__FILE__)

directory "ext/include/iv"

HOE = Hoe.spec 'iv-phonic' do
  developer('Constellation', 'utatane.tea@gmail.com')
  self.version = '0.0.5'
  self.readme_file = 'README.rdoc'
  self.history_file = 'ChangeLog'
  self.extra_rdoc_files = FileList['*.rdoc']
  self.extra_dev_deps << ['rake-compiler', '>= 0']
  self.spec_extras = {
    :extensions => ['ext/iv/phonic/extconf.rb']
  }
  self.summary = "iv / phonic : ECMAScript AST"
  self.require_ruby_version '>= 1.9.1'
end

Rake::ExtensionTask.new('phonic', HOE.spec) do |ext|
  ext.lib_dir = File.join('lib', 'iv')
  ext.ext_dir = File.join('ext', 'iv', 'phonic')
  ext.config_options << "--with-iv-include=#{File.join($root, 'ext', 'include')}"
end

Rake::Task[:test].prerequisites << :compile

task :checkout => ["ext/include/iv"] do |t|
  list = [
    ".autotest",
    "Manifest.txt",
    "README.rdoc",
    "Rakefile",
    "test/test_iv_phonic.rb"
  ]
  Dir.glob("../*.h") do |f|
    path = File.join("ext", "include", "iv", File.basename(f))
    list << path
    cp f, File.expand_path(path)
  end
  Dir.glob("ext/iv/phonic/*.*") do |f|
    list << f
  end
  File.open("Manifest.txt", "w") do |f|
    f.write(list.join("\n"))
  end
end

# vim: syntax=ruby

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
iv-phonic-0.0.5 Rakefile