[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:
parent
8f77e694f9
commit
2b6fc9ea72
Notes:
git
2025-01-30 06:50:10 +00:00
@ -173,8 +173,6 @@ def extmake(target, basedir = 'ext', maybestatic = true)
|
|||||||
$mdir = target
|
$mdir = target
|
||||||
$srcdir = File.join($top_srcdir, basedir, $mdir)
|
$srcdir = File.join($top_srcdir, basedir, $mdir)
|
||||||
$preload = nil
|
$preload = nil
|
||||||
$objs = []
|
|
||||||
$srcs = []
|
|
||||||
$extso = []
|
$extso = []
|
||||||
makefile = "./Makefile"
|
makefile = "./Makefile"
|
||||||
static = $static
|
static = $static
|
||||||
@ -208,7 +206,7 @@ def extmake(target, basedir = 'ext', maybestatic = true)
|
|||||||
begin
|
begin
|
||||||
$extconf_h = nil
|
$extconf_h = nil
|
||||||
ok &&= extract_makefile(makefile)
|
ok &&= extract_makefile(makefile)
|
||||||
old_objs = $objs
|
old_objs = $objs || []
|
||||||
old_cleanfiles = $distcleanfiles | $cleanfiles
|
old_cleanfiles = $distcleanfiles | $cleanfiles
|
||||||
conf = ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb"].find {|f| File.exist?(f)}
|
conf = ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb"].find {|f| File.exist?(f)}
|
||||||
if (!ok || ($extconf_h && !File.exist?($extconf_h)) ||
|
if (!ok || ($extconf_h && !File.exist?($extconf_h)) ||
|
||||||
@ -271,6 +269,8 @@ def extmake(target, basedir = 'ext', maybestatic = true)
|
|||||||
unless $destdir.to_s.empty? or $mflags.defined?("DESTDIR")
|
unless $destdir.to_s.empty? or $mflags.defined?("DESTDIR")
|
||||||
args += ["DESTDIR=" + relative_from($destdir, "../"+prefix)]
|
args += ["DESTDIR=" + relative_from($destdir, "../"+prefix)]
|
||||||
end
|
end
|
||||||
|
$objs ||= []
|
||||||
|
$srcs ||= []
|
||||||
if $static and ok and !$objs.empty? and !noinstall
|
if $static and ok and !$objs.empty? and !noinstall
|
||||||
args += ["static"]
|
args += ["static"]
|
||||||
$extlist.push [(maybestatic ? $static : false), target, $target, $preload]
|
$extlist.push [(maybestatic ? $static : false), target, $target, $preload]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user