From 6bc480e059b0b9a6a24dceaa96e2d0717cceca51 Mon Sep 17 00:00:00 2001 From: knu Date: Tue, 15 Jul 2008 12:33:28 +0000 Subject: [PATCH] * 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 --- ChangeLog | 9 +++++++++ configure.in | 22 ++++++++++++++++++---- mkconfig.rb | 1 - 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7deb74215..e67f783f86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Tue Jul 15 21:31:26 2008 Akinori MUSHA + + * 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 * ext/socket/socket.c (ruby_connect, s_accept): check before readable/ diff --git a/configure.in b/configure.in index 5e3047d5c2..c799ddab86 100644 --- a/configure.in +++ b/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]], diff --git a/mkconfig.rb b/mkconfig.rb index 589c6310a9..29ac54c725 100755 --- a/mkconfig.rb +++ b/mkconfig.rb @@ -140,7 +140,6 @@ end print(*v_fast) print(*v_others) print <