THRIFT-979. rb: ruby bindings used to work on jruby
authorBryan Duxbury <bryanduxbury@apache.org>
Wed, 17 Nov 2010 22:47:06 +0000 (22:47 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Wed, 17 Nov 2010 22:47:06 +0000 (22:47 +0000)
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

lib/rb/ext/extconf.rb

index 07558b8..36dac9b 100644 (file)
 # 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