Permalink
Browse files

fix rake-compiler hacks when cross-compile env is missing

  • Loading branch information...
1 parent 8b613d0 commit f4145c4d7ead546f81cdb52792c757c4cd1f9855 @tmm1 tmm1 committed Apr 2, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 rakelib/package.rake
View
@@ -32,7 +32,10 @@ else
# inject 1.8/1.9 pure-ruby entry point
# HACK: add these dependencies to the task instead of using cross_compiling
ext.cross_platform.each do |platform|
- Rake::Task["native:#{GEMSPEC.name}:#{platform}"].prerequisites.unshift "lib/#{ext.name}.rb"
+ task = "native:#{GEMSPEC.name}:#{platform}"
+ if Rake::Task.task_defined?(task)
+ Rake::Task[task].prerequisites.unshift "lib/#{ext.name}.rb"
+ end
end
end

0 comments on commit f4145c4

Please sign in to comment.