Sha256: 1648e7a7ffca3b0e5d31f99f547fd6a280efcb178c27b80f59ca063498b43aef
Contents?: true
Size: 1.15 KB
Versions: 6
Compression:
Stored size: 1.15 KB
Contents
## # 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. # # === Tasks Provided: # # compile:: Compile your c-extension. module Hoe::Compiler ## # Optional: Defines what tasks need to be compile first. [default: test] attr_accessor :compile_tasks ## # Initialize variables for compiler plugin. 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 ## # Define tasks for compiler plugin. 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 end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
hoe-2.15.0 | lib/hoe/compiler.rb |
hoe-2.14.0 | lib/hoe/compiler.rb |
hoe-2.13.1 | lib/hoe/compiler.rb |
hoe-2.13.0 | lib/hoe/compiler.rb |
hoe-2.12.5 | lib/hoe/compiler.rb |
hoe-2.12.4 | lib/hoe/compiler.rb |