summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2025-03-16 15:25:20 +0900
committernagachika <nagachika@ruby-lang.org>2025-03-16 15:25:20 +0900
commitda86a9959b4c5bbdefb6fd1000a0251a151ffbc1 (patch)
tree00bda70601a0f78d1334536d09b70aac5b79642f
parentac3f355fb33f4ce41df864f2084028610b7b38d1 (diff)
merge revision(s) 2b6fc9ea7212543a1be26768403f59c7a759b5ea: [Backport #21092]
[Bug #21092] Fallback variables after execonf has done When reading from a dummy makefile, the global variables initialized in `init_mkmf` may not be overridden.
-rwxr-xr-xext/extmk.rb6
-rw-r--r--version.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index d9c2417dfa..da0b06aaa5 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -167,8 +167,6 @@ def extmake(target, basedir = 'ext', maybestatic = true)
$mdir = target
$srcdir = File.join($top_srcdir, basedir, $mdir)
$preload = nil
- $objs = []
- $srcs = []
$extso = []
makefile = "./Makefile"
static = $static
@@ -202,7 +200,7 @@ def extmake(target, basedir = 'ext', maybestatic = true)
begin
$extconf_h = nil
ok &&= extract_makefile(makefile)
- old_objs = $objs
+ old_objs = $objs || []
old_cleanfiles = $distcleanfiles | $cleanfiles
conf = ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb"].find {|f| File.exist?(f)}
if (!ok || ($extconf_h && !File.exist?($extconf_h)) ||
@@ -265,6 +263,8 @@ def extmake(target, basedir = 'ext', maybestatic = true)
unless $destdir.to_s.empty? or $mflags.defined?("DESTDIR")
args += ["DESTDIR=" + relative_from($destdir, "../"+prefix)]
end
+ $objs ||= []
+ $srcs ||= []
if $static and ok and !$objs.empty? and !noinstall
args += ["static"]
$extlist.push [(maybestatic ? $static : false), target, $target, $preload]
diff --git a/version.h b/version.h
index 5a6e060a2e..08ec2cced8 100644
--- a/version.h
+++ b/version.h
@@ -11,7 +11,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 7
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 129
+#define RUBY_PATCHLEVEL 130
#include "ruby/version.h"
#include "ruby/internal/abi.h"