]> 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:27:30 +0000 (15:27 -0400)
libs/esl/Makefile.am
libs/esl/ruby/Makefile
libs/esl/ruby/cflags.rb

index 34220ee0d7cceeaf126f036636c8aa79413e5848..3d701a7951cdf3350ce745e032e18df8a5a76545 100644 (file)
@@ -96,4 +96,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 177b4481436256f752cd0f55631668d5321cebdc..ef7cbacc80a4bc175bf0a66f77fb71342e9a11d1 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