ESL-89: --resolve add rubymod-install and add ability to use a ruby not in your path by setting RUBY env var

This commit is contained in:
Michael Jerris 2014-04-07 15:27:24 -04:00
parent 8f3ee29c23
commit d6fa81b4b7
3 changed files with 13 additions and 4 deletions

View File

@ -96,4 +96,7 @@ phpmod-install: phpmod
pymod-install: pymod pymod-install: pymod
$(MAKE) -C python install $(MAKE) -C python install
rubymod-install: rubymod
$(MAKE) -C ruby install
everymod: perlmod phpmod luamod pymod rubymod javamod managedmod everymod: perlmod phpmod luamod pymod rubymod javamod managedmod

View File

@ -1,5 +1,7 @@
LOCAL_LDFLAGS=$(shell ruby -rrbconfig -e 'puts RbConfig::CONFIG["LIBRUBYARG"]') RUBY:=ruby
LOCAL_CFLAGS=$(shell ruby cflags.rb) 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 all: ESL.so
@ -12,6 +14,10 @@ esl_wrap.o: esl_wrap.cpp
ESL.so: esl_wrap.o ESL.so: esl_wrap.o
$(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(LOCAL_LDFLAGS) -o ESL.so -L. $(LIBS) $(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: clean:
rm -f *.o *.so *~ rm -f *.o *.so *~

View File

@ -3,6 +3,6 @@ require 'rbconfig'
cflags = if RUBY_VERSION =~ /1.9/ then cflags = if RUBY_VERSION =~ /1.9/ then
"-I#{RbConfig::CONFIG['rubyhdrdir']} -I#{RbConfig::CONFIG['rubyhdrdir']}/#{RbConfig::CONFIG['arch']}" "-I#{RbConfig::CONFIG['rubyhdrdir']} -I#{RbConfig::CONFIG['rubyhdrdir']}/#{RbConfig::CONFIG['arch']}"
else else
"-I#{RbConfig::CONFIG["topdir"]}" "-I#{RbConfig::CONFIG["topdir"]} -I#{RbConfig::CONFIG['rubyhdrdir']} -I#{RbConfig::CONFIG['rubyhdrdir']}/#{RbConfig::CONFIG['arch']}"
end end
puts cflags puts cflags