summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--configure.in8
-rwxr-xr-xinstruby.rb4
-rw-r--r--lib/rdoc/ri/paths.rb6
-rwxr-xr-xmkconfig.rb2
-rw-r--r--win32/Makefile.sub22
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) <yugui@yugui.jp>
+
+ * 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 <mame@tsg.ne.jp>
* 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 <<EOS
- CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
+ CONFIG["rubylibdir"] = "$(libdir)/$(ruby_install_name)/$(ruby_version)"
CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index f5465e2c75..583c1910a5 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -463,15 +463,15 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
!endif
#define DEFAULT_KCODE KCODE_NONE
#define DLEXT ".so"
-#define RUBY_LIB "/lib/ruby/$(ruby_version)"
-#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
-#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/$(ruby_version)"
-#define RUBY_VENDOR_LIB "/lib/ruby/vendor_ruby"
-#define RUBY_VENDOR_LIB2 "/lib/ruby/vendor_ruby/$(ruby_version)"
+#define RUBY_LIB "/lib/$(RUBY_INSTALL_NAME)/$(ruby_version)"
+#define RUBY_SITE_LIB "/lib/$(RUBY_INSTALL_NAME)/site_ruby"
+#define RUBY_SITE_LIB2 "/lib/$(RUBY_INSTALL_NAME)/site_ruby/$(ruby_version)"
+#define RUBY_VENDOR_LIB "/lib/$(RUBY_INSTALL_NAME)/vendor_ruby"
+#define RUBY_VENDOR_LIB2 "/lib/$(RUBY_INSTALL_NAME)/vendor_ruby/$(ruby_version)"
#define RUBY_PLATFORM "$(arch)"
-#define RUBY_ARCHLIB "/lib/ruby/$(ruby_version)/$(ARCH)-$(PLATFORM)"
-#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(ruby_version)/$(ARCH)-$(RT)"
-#define RUBY_VENDOR_ARCHLIB "/lib/ruby/vendor_ruby/$(ruby_version)/$(ARCH)-$(RT)"
+#define RUBY_ARCHLIB "/lib/$(RUBY_INSTALL_NAME)/$(ruby_version)/$(ARCH)-$(PLATFORM)"
+#define RUBY_SITE_ARCHLIB "/lib/$(RUBY_INSTALL_NAME)/site_ruby/$(ruby_version)/$(ARCH)-$(RT)"
+#define RUBY_VENDOR_ARCHLIB "/lib/$(RUBY_INSTALL_NAME)/vendor_ruby/$(ruby_version)/$(ARCH)-$(RT)"
#define LIBRUBY_SO "$(LIBRUBY_SO)"
#if 0
$(BANG)if "$(RUBY_SO_NAME)"!="$$(RUBY_SO_NAME)" || "$(ARCH)-$(PLATFORM)"!="$$(ARCH)-$$(PLATFORM)"
@@ -617,9 +617,9 @@ s,@EXPORT_PREFIX@, ,;t t
s,@arch@,$(ARCH)-$(PLATFORM),;t t
s,@sitearch@,$(ARCH)-$(RT),;t t
s,@ruby_version@,$(ruby_version),;t t
-s,@sitedir@,$${prefix}/lib/ruby/site_ruby,;t t
-s,@vendordir@,$${prefix}/lib/ruby/vendor_ruby,;t t
-s,@rubyhdrdir@,$$(includedir)/ruby-$$(ruby_version),;t t
+s,@sitedir@,$${prefix}/lib/$${RUBY_INSTALL_NAME}/site_ruby,;t t
+s,@vendordir@,$${prefix}/lib/$${RUBY_INSTALL_NAME}/vendor_ruby,;t t
+s,@rubyhdrdir@,$$(includedir)/$${RUBY_INSTALL_NAME}-$$(ruby_version),;t t
s,@sitehdrdir@,$$(rubyhdrdir)/site_ruby,;t t
s,@vendorhdrdir@,$$(rubyhdrdir)/vendor_ruby,;t t
s,@configure_args@,--with-make-prog=nmake --enable-shared $(configure_args),;t t