From da86a9959b4c5bbdefb6fd1000a0251a151ffbc1 Mon Sep 17 00:00:00 2001 From: nagachika Date: Sun, 16 Mar 2025 15:25:20 +0900 Subject: [PATCH] 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. --- ext/extmk.rb | 6 +++--- version.h | 2 +- 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"