rake-compiler plugin for hoe c-extensions.
This plugin is for extconf.rb based projects that want to use rake-compiler to deal with packaging binary gems. It expects a standard extconf setup, namely that your extconf.rb and c source is located in: ext/project-name.
Look at nokogiri for a good example of how to use this.
compile | Compile your c-extension. |
# File lib/hoe/compiler.rb, line 32 32: def activate_compiler_deps 33: dependency "rake-compiler", "~> 0.7", :development 34: gem "rake-compiler", "~> 0.7" 35: end
Define tasks for compiler plugin.
# File lib/hoe/compiler.rb, line 40 40: def define_compiler_tasks 41: require "rake/extensiontask" 42: 43: Rake::ExtensionTask.new self.name, spec do |ext| 44: ext.lib_dir = File.join(*["lib", self.name, ENV["FAT_DIR"]].compact) 45: end 46: 47: compile_tasks.each do |t| 48: task t => :compile 49: end 50: end
Initialize variables for compiler plugin.
# File lib/hoe/compiler.rb, line 25 25: def initialize_compiler 26: self.compile_tasks = [:multi, :test, :check_manifest] 27: self.spec_extras = { :extensions => ["ext/#{self.name}/extconf.rb"] } 28: 29: clean_globs << "lib/#{self.name}/*.{so,bundle,dll}" 30: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.