2021-09-02 23:18:31 +02:00
|
|
|
# vim: set noet sw=2 ts=2 sts=2:
|
|
|
|
|
|
|
|
require 'rake'
|
|
|
|
require 'rake/extensiontask'
|
|
|
|
require 'bundler'
|
|
|
|
|
2021-09-06 19:46:15 +02:00
|
|
|
extensions = %w[fideduperange].map {|n| [n, Pathname.new( 'ext') + n + "#{n}.so"] }.to_h
|
|
|
|
|
|
|
|
extensions.each do |name, path|
|
|
|
|
Rake::ExtensionTask.new name do |extension|
|
|
|
|
extension.lib_dir = path.dirname
|
|
|
|
end
|
2021-09-02 23:18:31 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
task :chmod do
|
2021-09-06 19:46:15 +02:00
|
|
|
extensions.each do |_,path|
|
|
|
|
path.chmod 0755
|
|
|
|
end
|
2021-09-02 23:18:31 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
task :clean do
|
2021-09-06 19:46:15 +02:00
|
|
|
extensions.each do |_,path|
|
|
|
|
path.unlink if path.exist?
|
|
|
|
end
|
2021-09-02 23:18:31 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
task :build => [:clean, :compile, :chmod]
|
|
|
|
|
2021-09-06 19:46:15 +02:00
|
|
|
Bundler::GemHelper.install_tasks name: 'duperemoverb'
|