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:
parent
8f3ee29c23
commit
d6fa81b4b7
|
@ -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
|
||||
|
|
|
@ -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 *~
|
||||
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue