diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rwxr-xr-x | tool/mkconfig.rb | 8 |
2 files changed, 11 insertions, 4 deletions
@@ -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. diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index d108a51c00..79c97fa490 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -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(' ')) |