* tool/mkconfig.rb: fix empty RbConfig::CONFIG["prefix"] when
  configured --with-rubyarchprefix, remove prefix from rubyarchdir
  after expansion for the case it does not start with '$(prefix)'.
  [fix GH-643]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-06-27 15:35:15 +00:00
Родитель 8de619bee5
Коммит bffd6395d6
2 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Sat Jun 28 00:35:10 2014 Lauri Tirkkonen <lotheac@iki.fi>
* tool/mkconfig.rb: fix empty RbConfig::CONFIG["prefix"] when
configured --with-rubyarchprefix, remove prefix from rubyarchdir
after expansion for the case it does not start with '$(prefix)'.
[fix GH-643]
Fri Jun 27 15:20:12 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* lib/rubygems/test_case.rb: rescue Gem::LoadError in Gem::TestCase.

Просмотреть файл

@ -167,10 +167,10 @@ def vars.expand(val, config = self)
val.replace(newval) unless newval == val
val
end
vars["prefix"] = ""
vars["exec_prefix"] = ""
prefix = vars.expand(vars["rubyarchdir"])
print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n"
prefix = vars.expand(vars["prefix"])
rubyarchdir = vars.expand(vars["rubyarchdir"])
relative_archdir = rubyarchdir.rindex(prefix, 0) ? rubyarchdir[prefix.size..-1] : rubyarchdir
print " TOPDIR = File.dirname(__FILE__).chomp!(#{relative_archdir.dump})\n"
print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n"
print <<'ARCH' if universal
arch_flag = ENV['ARCHFLAGS'] || ((e = ENV['RC_ARCHS']) && e.split.uniq.map {|a| "-arch #{a}"}.join(' '))