* ext/extmk.rb (extmake), lib/mkmf.rb (create_makefile): $objs and
$srcs are always Array or nil now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2a89c088a2
commit
2b3a204832
@ -1,3 +1,8 @@
|
|||||||
|
Tue Mar 3 16:25:43 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/extmk.rb (extmake), lib/mkmf.rb (create_makefile): $objs and
|
||||||
|
$srcs are always Array or nil now.
|
||||||
|
|
||||||
Tue Mar 3 15:54:11 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
Tue Mar 3 15:54:11 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* ext/dl/win32/lib/win32/{registry,resolv}.rb: use dl/import instead
|
* ext/dl/win32/lib/win32/{registry,resolv}.rb: use dl/import instead
|
||||||
|
@ -105,8 +105,8 @@ def extmake(target)
|
|||||||
$mdir = target
|
$mdir = target
|
||||||
$srcdir = File.join($top_srcdir, "ext", $mdir)
|
$srcdir = File.join($top_srcdir, "ext", $mdir)
|
||||||
$preload = nil
|
$preload = nil
|
||||||
$objs = ""
|
$objs = []
|
||||||
$srcs = ""
|
$srcs = []
|
||||||
$compiled[target] = false
|
$compiled[target] = false
|
||||||
makefile = "./Makefile"
|
makefile = "./Makefile"
|
||||||
ok = File.exist?(makefile)
|
ok = File.exist?(makefile)
|
||||||
@ -137,7 +137,6 @@ def extmake(target)
|
|||||||
}
|
}
|
||||||
begin
|
begin
|
||||||
$extconf_h = nil
|
$extconf_h = nil
|
||||||
$objs = []
|
|
||||||
ok &&= extract_makefile(makefile)
|
ok &&= extract_makefile(makefile)
|
||||||
old_objs = $objs
|
old_objs = $objs
|
||||||
conf = ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb"].find {|f| File.exist?(f)}
|
conf = ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb"].find {|f| File.exist?(f)}
|
||||||
@ -180,7 +179,7 @@ def extmake(target)
|
|||||||
args += ["static"] unless $clean
|
args += ["static"] unless $clean
|
||||||
$extlist.push [$static, $target, File.basename($target), $preload]
|
$extlist.push [$static, $target, File.basename($target), $preload]
|
||||||
end
|
end
|
||||||
FileUtils.rm_f($objs.split - old_objs)
|
FileUtils.rm_f($objs - old_objs)
|
||||||
unless system($make, *args)
|
unless system($make, *args)
|
||||||
$ignore or $continue or return false
|
$ignore or $continue or return false
|
||||||
end
|
end
|
||||||
|
@ -1591,9 +1591,8 @@ def create_makefile(target, srcprefix = nil)
|
|||||||
for i in $objs
|
for i in $objs
|
||||||
i.sub!(/\.o\z/, ".#{$OBJEXT}")
|
i.sub!(/\.o\z/, ".#{$OBJEXT}")
|
||||||
end
|
end
|
||||||
$objs = $objs.join(" ")
|
|
||||||
|
|
||||||
target = nil if $objs == ""
|
target = nil if $objs.empty?
|
||||||
|
|
||||||
if target and EXPORT_PREFIX
|
if target and EXPORT_PREFIX
|
||||||
if File.exist?(File.join(srcdir, target + '.def'))
|
if File.exist?(File.join(srcdir, target + '.def'))
|
||||||
@ -1642,7 +1641,7 @@ target_prefix = #{target_prefix}
|
|||||||
LOCAL_LIBS = #{$LOCAL_LIBS}
|
LOCAL_LIBS = #{$LOCAL_LIBS}
|
||||||
LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS}
|
LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS}
|
||||||
SRCS = #{srcs.collect(&File.method(:basename)).join(' ')}
|
SRCS = #{srcs.collect(&File.method(:basename)).join(' ')}
|
||||||
OBJS = #{$objs}
|
OBJS = #{$objs.join(" ")}
|
||||||
TARGET = #{target}
|
TARGET = #{target}
|
||||||
DLLIB = #{dllib}
|
DLLIB = #{dllib}
|
||||||
EXTSTATIC = #{$static || ""}
|
EXTSTATIC = #{$static || ""}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user