THRIFT-979. rb: ruby bindings used to work on jruby
Make a dummy makefile so that JRuby doesn't complain.
Patch: Jeff Hodges
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1036267 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/ext/extconf.rb b/lib/rb/ext/extconf.rb
index 07558b8..36dac9b 100644
--- a/lib/rb/ext/extconf.rb
+++ b/lib/rb/ext/extconf.rb
@@ -17,10 +17,14 @@
# under the License.
#
-require 'mkmf'
+if defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /jruby/
+ File.open('Makefile', 'w'){|f| f.puts "all:\n\ninstall:\n" }
+else
+ require 'mkmf'
-$CFLAGS = "-g -O2 -Wall -Werror"
+ $CFLAGS = "-g -O2 -Wall -Werror"
-have_func("strlcpy", "string.h")
+ have_func("strlcpy", "string.h")
-create_makefile 'thrift_native'
+ create_makefile 'thrift_native'
+end