summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-08-29 17:42:49 +0900
committerusa <usa@garbagecollect.jp>2022-09-16 15:12:47 +0900
commit7900a9bd388cff65ba98e4fa09b296eb1f4f815e (patch)
tree70f8d9cd959e9eb771904bdf3c253b55ead2e32c /ext
parent9733f4d0f00a38b5f77ee2e2fffdff866828cd66 (diff)
Backport https://github.com/ruby/ruby/pull/6193
Co-authored-by: Yuta Saito <kateinoigakukun@gmail.com>
Diffstat (limited to 'ext')
-rwxr-xr-xext/extmk.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 80a0a1208d..97f1ad9c39 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -408,8 +408,10 @@ if CROSS_COMPILING
$ruby = $mflags.defined?("MINIRUBY") || CONFIG['MINIRUBY']
elsif sep = config_string('BUILD_FILE_SEPARATOR')
$ruby = "$(topdir:/=#{sep})#{sep}miniruby" + EXEEXT
-else
+elsif CONFIG['EXTSTATIC']
$ruby = '$(topdir)/miniruby' + EXEEXT
+else
+ $ruby = '$(topdir)/ruby' + EXEEXT
end
$ruby = [$ruby]
$ruby << "-I'$(topdir)'"
@@ -421,6 +423,7 @@ end
topruby = $ruby
$ruby = topruby.join(' ')
$mflags << "ruby=#$ruby"
+$builtruby = '$(topdir)/miniruby' + EXEEXT # Must be an executable path
MTIMES = [__FILE__, 'rbconfig.rb', srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)}