summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-03 07:31:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-03 07:31:46 +0000
commit087a58314fcda22196b4572c58ff6269316d1fe1 (patch)
treead9a91f9cc8f8b97495d2aee7cba95ce16bc6ecf
parent399aed89724ecb3aebd0f46aeb8c98a6bdf5c47d (diff)
* ext/extmk.rb (extmake): removes object files no longer used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--ext/extmk.rb2
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 821476da3f..5ee0738c31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Mar 3 16:31:43 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/extmk.rb (extmake): removes object files no longer used.
+
Tue Mar 3 16:25:43 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb (extmake), lib/mkmf.rb (create_makefile): $objs and
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 35a54e814a..515c042555 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -146,6 +146,7 @@ def extmake(target)
begin
$extconf_h = nil
ok &&= extract_makefile(makefile)
+ 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)) ||
@@ -186,6 +187,7 @@ def extmake(target)
args += ["static"] unless $clean
$extlist.push [$static, $target, File.basename($target), $preload]
end
+ FileUtils.rm_f($objs - old_objs)
unless system($make, *args)
$ignore or $continue or return false
end