1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* configure.in (--with-ruby-version): Add a new option to specify

the ruby version string for version specific directories.
  [ruby-dev:35490]

* mkconfig.rb: Definition of ruby_version is now determined by the
  configure script.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2008-07-15 12:33:28 +00:00
parent a6efdc47f9
commit 6bc480e059
3 changed files with 27 additions and 5 deletions

View file

@ -1,3 +1,12 @@
Tue Jul 15 21:31:26 2008 Akinori MUSHA <knu@iDaemons.org>
* configure.in (--with-ruby-version): Add a new option to specify
the ruby version string for version specific directories.
[ruby-dev:35490]
* mkconfig.rb: Definition of ruby_version is now determined by the
configure script.
Tue Jul 15 18:14:20 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/socket/socket.c (ruby_connect, s_accept): check before readable/

View file

@ -1884,6 +1884,19 @@ case "$target_os" in
esac
RUBY_LIB_PREFIX=`eval echo \\"${libdir}/ruby\\"`
AC_ARG_WITH(ruby-version,
[ --with-ruby-version=STR ruby version string for version specific directories [[full]] (full|minor|STR)],
[ruby_version=$withval],
[ruby_version=full])
case "$ruby_version" in
full)
ruby_version="${MAJOR}.${MINOR}.${TEENY}"
;;
minor)
ruby_version="${MAJOR}.${MINOR}"
;;
esac
AC_ARG_WITH(sitedir,
[ --with-sitedir=DIR site libraries in DIR [[LIBDIR/ruby/site_ruby]]],
[sitedir=$withval],
@ -1908,9 +1921,9 @@ case "$target_os" in
RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
;;
esac
RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}.${TEENY}"
RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}.${TEENY}"
RUBY_VENDOR_LIB_PATH2="${RUBY_VENDOR_LIB_PATH}/${MAJOR}.${MINOR}.${TEENY}"
RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${ruby_version}"
RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${ruby_version}"
RUBY_VENDOR_LIB_PATH2="${RUBY_VENDOR_LIB_PATH}/${ruby_version}"
AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}")
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}")
@ -1920,6 +1933,7 @@ AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB2, "${RUBY_VENDOR_LIB_PATH2}")
AC_SUBST(arch)dnl
AC_SUBST(sitearch)dnl
AC_SUBST(ruby_version)dnl
AC_SUBST(sitedir)dnl
AC_SUBST(vendordir)dnl
@ -1961,7 +1975,7 @@ fi
AC_ARG_WITH(rubyhdrdir,
[ --with-ruby-hdrdir=DIR core headers in DIR [INCLUDEDIR]],
[rubyhdrdir=$withval],
[rubyhdrdir='${includedir}/ruby-${MAJOR}.${MINOR}.${TEENY}'])
[rubyhdrdir='${includedir}/ruby-${ruby_version}'])
AC_ARG_WITH(sitehdrdir,
[ --with-site-hdrdir=DIR core headers in DIR [INCLUDEDIR]],

View file

@ -140,7 +140,6 @@ end
print(*v_fast)
print(*v_others)
print <<EOS
CONFIG["ruby_version"] = "$(MAJOR).$(MINOR).$(TEENY)"
CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"