aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-03 08:10:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-03 08:10:10 +0000
commit27cc677088c21785815b1c137ec8e65e51c2dc83 (patch)
tree3b6bee38619002b3daf5ada19ff0cf1aeb31bf70
parentdba06de110c9ba74a58253f5be8a9293980d7bff (diff)
downloadruby-27cc677088c21785815b1c137ec8e65e51c2dc83.tar.gz
* ext/extmk.rb (extmake): removes object files no longer used and
files to be removed by old distclean. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--ext/extmk.rb5
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bc0d9a10cb..a28f914860 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Mar 3 17:10:09 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/extmk.rb (extmake): removes object files no longer used and
+ files to be removed by old distclean.
+
Tue Mar 3 16:51:51 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/dl/win32/lib/win32/resolv.rb: get rid of warning.
@@ -40,8 +45,6 @@ Tue Mar 3 14:57:28 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* common.mk (main): passes $(MAKE) to mkmain_cmd
- * ext/extmk.rb (extmake): removes object files no longer used.
-
* ext/extmk.rb (command_output): uses arguments to invoke make.
Tue Mar 3 01:56:03 2009 Tanaka Akira <akr@fsij.org>
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 509c93e46f..10cb056302 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -80,6 +80,7 @@ def extract_makefile(makefile, keep = true)
end
$objs = (m[/^OBJS[ \t]*=[ \t](.*)/, 1] || "").split
$srcs = (m[/^SRCS[ \t]*=[ \t](.*)/, 1] || "").split
+ $distcleanfiles = (m[/^DISTCLEANFILES[ \t]*=[ \t](.*)/, 1] || "").split
$LOCAL_LIBS = m[/^LOCAL_LIBS[ \t]*=[ \t]*(.*)/, 1] || ""
$LIBPATH = Shellwords.shellwords(m[/^libpath[ \t]*=[ \t]*(.*)/, 1] || "") - %w[$(libdir) $(topdir)]
true
@@ -139,6 +140,7 @@ def extmake(target)
$extconf_h = nil
ok &&= extract_makefile(makefile)
old_objs = $objs
+ old_cleanfiles = $distcleanfiles
conf = ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb"].find {|f| File.exist?(f)}
if (($extconf_h && !File.exist?($extconf_h)) ||
!(t = modified?(makefile, MTIMES)) ||
@@ -179,7 +181,8 @@ def extmake(target)
args += ["static"] unless $clean
$extlist.push [$static, $target, File.basename($target), $preload]
end
- FileUtils.rm_f($objs - old_objs)
+ FileUtils.rm_f(old_cleanfiles - $distcleanfiles)
+ FileUtils.rm_f(old_objs - $objs)
unless system($make, *args)
$ignore or $continue or return false
end