1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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:
nobu 2009-03-03 07:25:50 +00:00
parent 2a89c088a2
commit 2b3a204832
3 changed files with 11 additions and 8 deletions

View file

@ -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>
* ext/dl/win32/lib/win32/{registry,resolv}.rb: use dl/import instead

View file

@ -105,8 +105,8 @@ def extmake(target)
$mdir = target
$srcdir = File.join($top_srcdir, "ext", $mdir)
$preload = nil
$objs = ""
$srcs = ""
$objs = []
$srcs = []
$compiled[target] = false
makefile = "./Makefile"
ok = File.exist?(makefile)
@ -137,9 +137,8 @@ def extmake(target)
}
begin
$extconf_h = nil
$objs = []
ok &&= extract_makefile(makefile)
old_objs = $objs
old_objs = $objs
conf = ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb"].find {|f| File.exist?(f)}
if (($extconf_h && !File.exist?($extconf_h)) ||
!(t = modified?(makefile, MTIMES)) ||
@ -180,7 +179,7 @@ def extmake(target)
args += ["static"] unless $clean
$extlist.push [$static, $target, File.basename($target), $preload]
end
FileUtils.rm_f($objs.split - old_objs)
FileUtils.rm_f($objs - old_objs)
unless system($make, *args)
$ignore or $continue or return false
end

View file

@ -1591,9 +1591,8 @@ def create_makefile(target, srcprefix = nil)
for i in $objs
i.sub!(/\.o\z/, ".#{$OBJEXT}")
end
$objs = $objs.join(" ")
target = nil if $objs == ""
target = nil if $objs.empty?
if target and EXPORT_PREFIX
if File.exist?(File.join(srcdir, target + '.def'))
@ -1642,7 +1641,7 @@ target_prefix = #{target_prefix}
LOCAL_LIBS = #{$LOCAL_LIBS}
LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS}
SRCS = #{srcs.collect(&File.method(:basename)).join(' ')}
OBJS = #{$objs}
OBJS = #{$objs.join(" ")}
TARGET = #{target}
DLLIB = #{dllib}
EXTSTATIC = #{$static || ""}