summaryrefslogtreecommitdiff
path: root/tool/mkconfig.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-27 22:52:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-27 22:52:46 +0000
commit76bb597728c0d9a2228367e0ecaf6b92b7ffdfd7 (patch)
tree9dd9f3949be4a8df4c31e61d131f9bb58eacbefb /tool/mkconfig.rb
parente63ab5d3ad289767eab49787e4e33390b0ce74e1 (diff)
mkconfig.rb: fix empty prefix
* tool/mkconfig.rb: vars["prefix"] may not set. [fix GH-643] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/mkconfig.rb')
-rwxr-xr-xtool/mkconfig.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index 79c97fa..85b5ca4 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -167,8 +167,8 @@ def vars.expand(val, config = self)
val.replace(newval) unless newval == val
val
end
-prefix = vars.expand(vars["prefix"])
-rubyarchdir = vars.expand(vars["rubyarchdir"])
+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"