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 | 8875ffc4120fd8ef273f1b584803bc83891ff23b (patch) | |
tree | d4649bd1559d94e2f442abbdf324feaa763bed29 /lib/rdoc/ri/paths.rb | |
parent | 803c0550439fadc86699fd193d541330f1503890 (diff) |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@23554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/ri/paths.rb')
-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 11bbf4573f..bce71b46f0 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) |