From 5660e09f08362a4146b285ca50225348d1213633 Mon Sep 17 00:00:00 2001 From: yugui Date: Fri, 24 Oct 2008 14:05:49 +0000 Subject: [PATCH] * configure.in (sitedir): considers --program-prefix and --program-suffix. (vendordir): ditto. (rubyhdrdir): ditto. * mkconfig.rb (CONFIG["rubylibdir"]): ditto. * win32/Makefile.sub: ditto. * instruby.rb (:rdoc): ditto. * lib/rdoc/ri/paths.rb (RDoc::RI::Paths): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 15 +++++++++++++++ configure.in | 8 ++++---- instruby.rb | 4 +++- lib/rdoc/ri/paths.rb | 6 ++++-- mkconfig.rb | 2 +- win32/Makefile.sub | 22 +++++++++++----------- 6 files changed, 38 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 139d8b0fe5..3b5f43c294 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Fri Oct 24 23:04:42 2008 Yuki Sonoda (Yugui) + + * configure.in (sitedir): considers --program-prefix and + --program-suffix. + (vendordir): ditto. + (rubyhdrdir): ditto. + + * mkconfig.rb (CONFIG["rubylibdir"]): ditto. + + * win32/Makefile.sub: ditto. + + * instruby.rb (:rdoc): ditto. + + * lib/rdoc/ri/paths.rb (RDoc::RI::Paths): ditto. + Fri Oct 24 22:59:27 2008 Yusuke Endoh * test/ruby/test_array.rb (test_sample): add tests for size of diff --git a/configure.in b/configure.in index 10a0d31003..c9958ee489 100644 --- a/configure.in +++ b/configure.in @@ -1963,7 +1963,7 @@ case "$target_os" in rubyw_install_name="$RUBYW_INSTALL_NAME" ;; esac -RUBY_LIB_PREFIX=`eval echo \\"${libdir}/ruby\\"` +RUBY_LIB_PREFIX=`eval echo \\"${libdir}/${RUBY_INSTALL_NAME}\\"` AC_ARG_WITH(ruby-version, [ --with-ruby-version=STR ruby version string for version specific directories [[full]] (full|minor|STR)], @@ -1981,13 +1981,13 @@ esac AC_ARG_WITH(sitedir, [ --with-sitedir=DIR site libraries in DIR [[LIBDIR/ruby/site_ruby]]], [sitedir=$withval], - [sitedir='${libdir}/ruby/site_ruby']) + [sitedir='${libdir}/${RUBY_INSTALL_NAME}/site_ruby']) SITE_DIR=`eval echo \\"${sitedir}\\"` AC_ARG_WITH(vendordir, [ --with-vendordir=DIR vendor libraries in DIR [[LIBDIR/ruby/vendor_ruby]]], [vendordir=$withval], - [vendordir='${libdir}/ruby/vendor_ruby']) + [vendordir='${libdir}/${RUBY_INSTALL_NAME}/vendor_ruby']) VENDOR_DIR=`eval echo \\"${vendordir}\\"` case "$target_os" in @@ -2056,7 +2056,7 @@ fi AC_ARG_WITH(rubyhdrdir, [ --with-ruby-hdrdir=DIR core headers in DIR [INCLUDEDIR]], [rubyhdrdir=$withval], - [rubyhdrdir='${includedir}/ruby-${ruby_version}']) + [rubyhdrdir='${includedir}/${RUBY_INSTALL_NAME}-${ruby_version}']) AC_ARG_WITH(sitehdrdir, [ --with-site-hdrdir=DIR core headers in DIR [INCLUDEDIR]], diff --git a/instruby.rb b/instruby.rb index c7ffe8d04d..02b74c4ebe 100755 --- a/instruby.rb +++ b/instruby.rb @@ -2,6 +2,7 @@ load "./rbconfig.rb" include RbConfig +$".unshift File.expand_path("./rbconfig.rb") srcdir = File.dirname(__FILE__) $:.unshift File.expand_path("lib", srcdir) @@ -10,6 +11,7 @@ require 'shellwords' require 'optparse' require 'optparse/shellwords' require 'tempfile' +require 'rdoc/ri/paths' STDOUT.sync = true File.umask(0) @@ -280,7 +282,7 @@ install?(:rdoc) do if $rdocdir puts "installing rdoc" - ridatadir = File.join(CONFIG['datadir'], 'ri/$(MAJOR).$(MINOR).$(TEENY)/system') + ridatadir = RDoc::RI::Paths::SYSDIR Config.expand(ridatadir) makedirs [ridatadir] install_recursive($rdocdir, ridatadir, :mode => $data_mode) diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb index 2f72b9dfd5..037606ec27 100644 --- a/lib/rdoc/ri/paths.rb +++ b/lib/rdoc/ri/paths.rb @@ -28,13 +28,15 @@ module RDoc::RI::Paths VERSION = RbConfig::CONFIG['ruby_version'] - base = File.join(RbConfig::CONFIG['datadir'], "ri", VERSION) + ri = RbConfig::CONFIG['RUBY_INSTALL_NAME'].sub(/ruby/, 'ri') + base = File.join(RbConfig::CONFIG['datadir'], ri, VERSION) SYSDIR = File.join(base, "system") SITEDIR = File.join(base, "site") homedir = ENV['HOME'] || ENV['USERPROFILE'] || ENV['HOMEPATH'] if homedir then - HOMEDIR = File.join(homedir, ".rdoc") + rdoc = RbConfig::CONFIG['RUBY_INSTALL_NAME'].sub(/ruby/, 'rdoc') + HOMEDIR = File.join(homedir, ".#{rdoc}") else HOMEDIR = nil end diff --git a/mkconfig.rb b/mkconfig.rb index 19e456c160..e56af5d043 100755 --- a/mkconfig.rb +++ b/mkconfig.rb @@ -141,7 +141,7 @@ end print(*v_fast) print(*v_others) print <