Skip to content

Commit 2ee25f7

Browse files
committed
merge revision(s) 2b6fc9e: [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.
1 parent ead3bbc commit 2ee25f7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/extmk.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ def extmake(target, basedir = 'ext', maybestatic = true)
173173
$mdir = target
174174
$srcdir = File.join($top_srcdir, basedir, $mdir)
175175
$preload = nil
176-
$objs = []
177-
$srcs = []
178176
$extso = []
179177
makefile = "./Makefile"
180178
static = $static
@@ -208,7 +206,7 @@ def extmake(target, basedir = 'ext', maybestatic = true)
208206
begin
209207
$extconf_h = nil
210208
ok &&= extract_makefile(makefile)
211-
old_objs = $objs
209+
old_objs = $objs || []
212210
old_cleanfiles = $distcleanfiles | $cleanfiles
213211
conf = ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb"].find {|f| File.exist?(f)}
214212
if (!ok || ($extconf_h && !File.exist?($extconf_h)) ||
@@ -271,6 +269,8 @@ def extmake(target, basedir = 'ext', maybestatic = true)
271269
unless $destdir.to_s.empty? or $mflags.defined?("DESTDIR")
272270
args += ["DESTDIR=" + relative_from($destdir, "../"+prefix)]
273271
end
272+
$objs ||= []
273+
$srcs ||= []
274274
if $static and ok and !$objs.empty? and !noinstall
275275
args += ["static"]
276276
$extlist.push [(maybestatic ? $static : false), target, $target, $preload]

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
1212
#define RUBY_VERSION_TEENY 1
1313
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
14-
#define RUBY_PATCHLEVEL 20
14+
#define RUBY_PATCHLEVEL 21
1515

1616
#include "ruby/version.h"
1717
#include "ruby/internal/abi.h"

0 commit comments

Comments
 (0)