merge revision(s) 2b6fc9ea72: [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.
This commit is contained in:
nagachika 2025-03-16 15:25:20 +09:00
parent ac3f355fb3
commit da86a9959b
2 changed files with 4 additions and 4 deletions

View file

@ -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]

View file

@ -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"