Author: bryanduxbury
Date: Wed Nov 17 22:47:06 2010
New Revision: 1036267
URL: http://svn.apache.org/viewvc?rev=1036267&view=rev
Log:
THRIFT-979. rb: ruby bindings used to work on jruby
Make a dummy makefile so that JRuby doesn't complain.
Patch: Jeff Hodges
Modified:
thrift/trunk/lib/rb/ext/extconf.rb
Modified: thrift/trunk/lib/rb/ext/extconf.rb
URL:
http://svn.apache.org/viewvc/thrift/trunk/lib/rb/ext/extconf.rb?rev=1036267&r1=1036266&r2=1036267&view=diff
==============================================================================
--- thrift/trunk/lib/rb/ext/extconf.rb (original)
+++ thrift/trunk/lib/rb/ext/extconf.rb Wed Nov 17 22:47:06 2010
@@ -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