diff --git a/tool/mkrunnable.rb b/tool/mkrunnable.rb index 0bdc7784bd..ef358e2425 100755 --- a/tool/mkrunnable.rb +++ b/tool/mkrunnable.rb @@ -34,7 +34,10 @@ vendordir = config["vendordir"] rubylibdir = config["rubylibdir"] rubyarchdir = config["rubyarchdir"] archdir = "#{extout}/#{arch}" -exedir = libdirname == "archlibdir" ? "#{config["libexecdir"]}/#{arch}" : bindir +exedir = bindir +if libdirname == "archlibdir" + exedir = exedir.sub(%r[/\K(?=[^/]+\z)]) {extout+"/"} +end [exedir, libdir, archdir].uniq.each do |dir| File.directory?(dir) or mkdir_p(dir) end diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 9a0d20b746..c550a9485f 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -367,11 +367,7 @@ goruby_install_name = "go" + ruby_install_name bindir = CONFIG["bindir", true] if CONFIG["libdirname"] == "archlibdir" - libexecdir = MAKEFILE_CONFIG["archlibdir"].dup - unless libexecdir.sub!(/\$\(lib\K(?=dir\))/) {"exec"} - libexecdir = "$(libexecdir)/$(arch)" - end - archbindir = RbConfig.expand(libexecdir) + archbindir = bindir.sub(%r[/\K(?=[^/]+\z)]) {CONFIG["target"] + "/"} end libdir = CONFIG[CONFIG.fetch("libdirname", "libdir"), true] rubyhdrdir = CONFIG["rubyhdrdir", true]