Permalink
Browse files

Merge remote branch 'timfel/master'

  • Loading branch information...
2 parents 6e881ac + 9612e9f commit 674ced23455f02f7b5d1fff8041daa2165aefc7a @luislavena luislavena committed Aug 7, 2010
Showing with 13 additions and 1 deletion.
  1. +13 −1 lib/rake/extensiontask.rb
View
14 lib/rake/extensiontask.rb
@@ -32,8 +32,20 @@ def cross_compiling(&block)
@cross_compiling = block if block_given?
end
+ def binary(platform = nil)
+ if platform == "java"
+ warn_once <<-EOF
+Compiling a native C extension on JRuby. This is discouraged and a
+Java extension should be preferred.
+ EOF
+ "#{name}.#{RbConfig::MAKEFILE_CONFIG['DLEXT']}"
+ else
+ super
+ end
+ end
+
def define
- if RUBY_PLATFORM == 'java' || (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ironruby')
+ if (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ironruby')
warn_once <<-EOF
WARNING: You're attempting to (cross-)compile C extensions from a platform
(#{RUBY_ENGINE}) that does not support native extensions or mkmf.rb.

0 comments on commit 674ced2

Please sign in to comment.