From c3affb3940d1f479e5a68d6a6a5e32cb5d19a87e Mon Sep 17 00:00:00 2001 From: Bryan Duxbury Date: Wed, 17 Nov 2010 22:47:06 +0000 Subject: [PATCH] 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 --- lib/rb/ext/extconf.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/rb/ext/extconf.rb b/lib/rb/ext/extconf.rb index 07558b8a..36dac9b7 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 -- 2.17.1