Sha256: c631a4ee374fe179289836a9edf37bcbbed6b08e1dae4d090d35f031c14beeab
Contents?: true
Size: 962 Bytes
Versions: 5
Compression:
Stored size: 962 Bytes
Contents
require "bundler/gem_tasks" require 'rake/testtask' require 'rake/clean' NAME = 'iconv' # rule to build the extension: this says # that the extension should be rebuilt # after any change to the files in ext file "lib/#{NAME}/#{NAME}.so" => Dir.glob("ext/#{NAME}/*{.rb,.c}") do Dir.chdir("ext/#{NAME}") do # this does essentially the same thing # as what RubyGems does ruby "extconf.rb", *ARGV.grep(/\A--/) sh "make", *ARGV.grep(/\A(?!--)/) end cp "ext/#{NAME}/#{NAME}.so", "lib/#{NAME}" end # make the :test task depend on the shared # object, so it will be built automatically # before running the tests task :test => "lib/#{NAME}/#{NAME}.so" # use 'rake clean' and 'rake clobber' to # easily delete generated files CLEAN.include('ext/**/*{.o,.log,.so}') CLEAN.include('ext/**/Makefile') CLOBBER.include('lib/**/*.so') # the same as before Rake::TestTask.new do |t| t.libs << 'test' end desc "Run tests" task :default => :test
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
iconv-1.0.6 | Rakefile |
iconv-1.0.5 | Rakefile |
iconv-1.0.4 | Rakefile |
iconv-1.0.3 | Rakefile |
iconv-1.0.2 | Rakefile |