Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* 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
  • Loading branch information...
commit 6bc480e059b0b9a6a24dceaa96e2d0717cceca51 1 parent a6efdc4
@knu knu authored
Showing with 27 additions and 5 deletions.
  1. +9 −0 ChangeLog
  2. +18 −4 configure.in
  3. +0 −1  mkconfig.rb
View
9 ChangeLog
@@ -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
22 configure.in
@@ -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
1  mkconfig.rb
@@ -140,7 +140,6 @@ module RbConfig
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)"
Please sign in to comment.
Something went wrong with that request. Please try again.