diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-23 16:07:46 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-23 16:07:46 +0000 |
| commit | c13905d24b4f4e336c44d998d6fc0473b2303cbe (patch) | |
| tree | d4649bd1559d94e2f442abbdf324feaa763bed29 /lib/rdoc/ri | |
| parent | 46a74f06c68f28797723e1d81ec7f727d613d37d (diff) | |
| download | ruby-c13905d24b4f4e336c44d998d6fc0473b2303cbe.tar.gz ruby-c13905d24b4f4e336c44d998d6fc0473b2303cbe.tar.xz ruby-c13905d24b4f4e336c44d998d6fc0473b2303cbe.zip | |
* configure.in ($ridir): new configuration. [ruby-core:23520].
c.f. [ruby-core:23519].
(--with-ridir): new configure option.
* tool/instruby.rb (:doc, :rdoc): uses $ridir instead of
a fixed path.
* lib/rdoc/ri/paths.rb: follows $ridir.
* Makefile.in: removes RIDATADIR which is no longer used.
* bcc32/Makefile.sub: generates the 'ridir' entry for RbConfig.
removes RIDATADIR which is no longer used.
* win32/Makefile.sub: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/ri')
| -rw-r--r-- | lib/rdoc/ri/paths.rb | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb index 11bbf4573..bce71b46f 100644 --- a/lib/rdoc/ri/paths.rb +++ b/lib/rdoc/ri/paths.rb @@ -28,14 +28,25 @@ module RDoc::RI::Paths VERSION = RbConfig::CONFIG['ruby_version'] - if m = /ruby/.match(RbConfig::CONFIG['RUBY_INSTALL_NAME']) - m = [m.pre_match, m.post_match] + if VERSION > '1.9.1' + if m = /ruby/.match(RbConfig::CONFIG['RUBY_INSTALL_NAME']) + m = [m.pre_match, m.post_match] + else + m = [""] * 2 + end + ri = "#{m[0]}ri#{m[1]}" + rdoc = "#{m[0]}rdoc#{m[1]}" + base = File.join(RbConfig::CONFIG['datadir'], ri, VERSION) else - m = [""] * 2 + if m = /ruby/.match(RbConfig::CONFIG['RUBY_BASE_NAME']) + m = [m.pre_match, m.post_match] + else + m = [""] * 2 + end + ri = "#{m[0]}ri#{m[1]}" + rdoc = "#{m[0]}rdoc#{m[1]}" + base = File.join(RbConfig::CONFIG['ridir'], VERSION) end - ri = "#{m[0]}ri#{m[1]}" - rdoc = "#{m[0]}rdoc#{m[1]}" - base = File.join(RbConfig::CONFIG['datadir'], ri, VERSION) SYSDIR = File.join(base, "system") SITEDIR = File.join(base, "site") HOMEDIR = (File.expand_path("~/.#{rdoc}") rescue nil) |
