module Hoe::Compiler
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.
Tasks Provided:¶ ↑
- compile
-
Compile your c-extension.
Attributes
compile_tasks[RW]
Optional: Defines what tasks need to be compile first. [default: test]
Public Instance Methods
define_compiler_tasks()
click to toggle source
Define tasks for compiler plugin.
# File lib/hoe/compiler.rb, line 35 def define_compiler_tasks require "rake/extensiontask" Rake::ExtensionTask.new self.name, spec do |ext| ext.lib_dir = File.join(*["lib", self.name, ENV["FAT_DIR"]].compact) end compile_tasks.each do |t| task t => :compile end end
initialize_compiler()
click to toggle source
Initialize variables for compiler plugin.
# File lib/hoe/compiler.rb, line 23 def initialize_compiler self.compile_tasks = [:multi, :test] self.spec_extras = { :extensions => ["ext/#{self.name}/extconf.rb"] } clean_globs << "lib/#{self.name}/*.{so,bundle,dll}" dependency "rake-compiler", "~> 0.7", :development end