Skip to content

Commit

Permalink
add option --rubydir to override ruby installation path
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Aug 22, 2011
1 parent 676fcae commit ddac142
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Makefile.template
Expand Up @@ -298,7 +298,7 @@ install-java_modular: $(TEMPLATE_TARGET)

install-ruby_modular: $(TEMPLATE_TARGET)
install -d -m755 "$(RUBY_EXTENSIONS_INSTALL_DIR)"
install -m755 $(TEMPLATE_TARGET) "$(RUBY_EXTENSIONS_INSTALL_DIR)"
install -m755 modshogun.$(EXT_LIB) "$(RUBY_EXTENSIONS_INSTALL_DIR)"

install-lua_modular: $(TEMPLATE_TARGET)
#TODO
Expand Down
11 changes: 10 additions & 1 deletion src/configure
Expand Up @@ -105,6 +105,7 @@ _confdir=""
_libdir=""
_incdir=""
_pydir=""
_rubydir=""
_octdir=""
_inc_extra=""
_ld_extra=""
Expand Down Expand Up @@ -707,7 +708,7 @@ else
end
EOF
RUBY_LIBRARY_DIR=`ruby "$TMPRUBY" 2>/dev/null`
RUBY_EXTENSIONS_INSTALL_DIR=$_libdir`ruby -e 'require "mkmf"; puts "ruby/" + Config::expand("$(ruby_version)") + "/" + Config::expand("$(arch)")'`
RUBY_EXTENSIONS_INSTALL_DIR=$_libdir/$_rubydir/`ruby -e 'require "mkmf"; puts Config::expand("$(ruby_version)") + "/" + Config::expand("$(arch)")'`
test_ruby_narray
_ruby_modular=yes
else
Expand Down Expand Up @@ -1163,6 +1164,7 @@ Installation directories:
--libdir=DIR use this prefix for object code libraries [PREFIX/lib]
--incdir=DIR use this prefix for include files [PREFIX/include]
--pydir=DIR use this prefix for python files [PREFIX/auto-detected]
--rubydir=DIR use this prefix for python files [PREFIX/auto-detected]
--octdir=DIR use this prefix for octave files [PREFIX/auto-detected]
--rdir=DIR use this prefix for r files [PREFIX/auto-detected]
Expand Down Expand Up @@ -1459,6 +1461,9 @@ for ac_option do
--pydir=*)
_pydir=$(mangle_homedir_tilde "`echo $ac_option | cut -d '=' -f 2`")
;;
--rubydir=*)
_rubydir=$(mangle_homedir_tilde "`echo $ac_option | cut -d '=' -f 2`")
;;
--octdir=*)
_octdir=$(mangle_homedir_tilde "`echo $ac_option | cut -d '=' -f 2`")
;;
Expand Down Expand Up @@ -1490,6 +1495,10 @@ if test -z "$_pydir" ; then
fi
fi

if test -z "$_rubydir" ; then
_rubydir="site_ruby"
fi

determine_system_name()
{
# Determine our OS name and CPU architecture
Expand Down

0 comments on commit ddac142

Please sign in to comment.