From 379bbd6d9c1269809aea4566da0727eaf3f77c32 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 9 Nov 2024 19:58:44 +0900 Subject: [PATCH] [Bug #20800] Move executable binary file path From under "libexec", under `$(target)/bin` like as binutils. --- tool/mkrunnable.rb | 5 ++++- tool/rbinstall.rb | 6 +----- 2 files changed, 5 insertions(+), 6 deletions(-) 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]