]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
ESL-89: --resolve add rubymod-install and add ability to use a ruby not in your path...
authorMichael Jerris <mike@jerris.com>
Mon, 7 Apr 2014 19:27:24 +0000 (15:27 -0400)
committerMichael Jerris <mike@jerris.com>
Mon, 7 Apr 2014 19:50:30 +0000 (15:50 -0400)
Conflicts:
libs/esl/Makefile.am

libs/esl/Makefile
libs/esl/ruby/Makefile
libs/esl/ruby/cflags.rb

index 3e59a9dc0ce859f34bbc810a5ea236e19d725b16..af8aecdb8b034cd58161ad7c57fe0fa63698ff5a 100644 (file)
@@ -105,4 +105,7 @@ phpmod-install: phpmod
 pymod-install: pymod
        $(MAKE) -C python install
 
+rubymod-install: rubymod
+       $(MAKE) -C ruby install
+
 everymod: perlmod phpmod luamod pymod rubymod javamod managedmod
index 21ed211a4482d7ef36017805ff2fdef412497b7d..4ae6c357c19c1413b49d6fc399639a56c6360934 100644 (file)
@@ -1,5 +1,7 @@
-LOCAL_LDFLAGS=$(shell ruby -rrbconfig -e 'puts RbConfig::CONFIG["LIBRUBYARG"]')
-LOCAL_CFLAGS=$(shell ruby cflags.rb)
+RUBY:=ruby
+LOCAL_LDFLAGS=$(shell $(RUBY) -rrbconfig -e 'puts RbConfig::CONFIG["LIBRUBYARG"]')
+LOCAL_CFLAGS=$(shell $(RUBY) cflags.rb)
+RUBY_GEM_DIR=$(shell $(RUBY) -e 'puts Gem.dir')
 
 all: ESL.so
 
@@ -12,6 +14,10 @@ esl_wrap.o: esl_wrap.cpp
 ESL.so: esl_wrap.o
        $(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(LOCAL_LDFLAGS) -o ESL.so -L. $(LIBS)
 
+
+install: ESL.so
+       install -m 755 ESL.so $(RUBY_GEM_DIR)
+
 clean:
        rm -f *.o *.so *~
 
index 45c10b1727b4ca27bcdc8e3c21551fa509073f42..5a269c94686137522f100648690841ceb0a50c7b 100644 (file)
@@ -3,6 +3,6 @@ require 'rbconfig'
 cflags = if RUBY_VERSION =~ /1.9/ then
   "-I#{RbConfig::CONFIG['rubyhdrdir']} -I#{RbConfig::CONFIG['rubyhdrdir']}/#{RbConfig::CONFIG['arch']}"
 else
-  "-I#{RbConfig::CONFIG["topdir"]}"
+  "-I#{RbConfig::CONFIG["topdir"]} -I#{RbConfig::CONFIG['rubyhdrdir']} -I#{RbConfig::CONFIG['rubyhdrdir']}/#{RbConfig::CONFIG['arch']}"
 end
-puts cflags
\ No newline at end of file
+puts cflags