Skip to content

Commit

Permalink
Fix ext/rabbitmq/Rakefile to remove unnecessary files on install.
Browse files Browse the repository at this point in the history
  • Loading branch information
jemc committed Aug 5, 2015
1 parent 222184a commit 4291e5e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ext/rabbitmq/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require 'ffi'

FILES = {}

task :default => :build
task :default => [:build, :compact]

def self.file_task(filename, opts, &block)
name, dep = opts.is_a?(Hash) ? opts.to_a.first : [opts, nil]
Expand Down Expand Up @@ -45,3 +45,9 @@ file_task "librabbitmq.#{::FFI::Platform::LIBSUFFIX}", :build => :configure do
cmd "/usr/bin/env sh -c 'cd #{FILES[:download]} && make'"
cmd "cp #{FILES[:download]}/librabbitmq/.libs/#{FILES[:build]} ."
end

task :compact => FILES[:build] do
FILES.each do |key, filename|
cmd "rm -rf #{filename}" unless key == :build
end
end

0 comments on commit 4291e5e

Please sign in to comment.