From c1c86a37df4afa6a4c9f9a55d8fe4a6667b4032d Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 18 Jul 2003 08:34:45 +0000 Subject: * lib/mkmf.rb (rm_f): use FileUtils. * lib/mkmf.rb (modified?): return mtime of the target if it exists and newer than times. * lib/mkmf.rb (install_files): add a current directory file even if it does not exist yet. * lib/mkmf.rb (configuration): do not add $LDFLAGS to DLDFLAGS. * ext/extmk.rb (extmake): check whether Makefile is newer than depend and MANIFEST. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/extmk.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'ext/extmk.rb') diff --git a/ext/extmk.rb b/ext/extmk.rb index 0485568d6b..f7cffa72ec 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -73,7 +73,9 @@ def extmake(target) $srcdir = File.join($top_srcdir, "ext", $mdir) unless $ignore if $static || - older("./Makefile", *MTIMES + %W"#{$srcdir}/makefile.rb #{$srcdir}/extconf.rb") + !(t = modified?("./Makefile", MTIMES)) || + %W<#{$srcdir}/makefile.rb #{$srcdir}/extconf.rb + #{$srcdir}/depend #{$srcdir}/MANIFEST>.any? {|f| modified?(f, [t])} then $defs = [] Logging::logfile 'mkmf.log' @@ -244,7 +246,7 @@ if $extlist.size > 0 end src = "void Init_ext() {\n#$extinit}\n" - if older("extinit.c", *MTIMES) || IO.read("extinit.c") != src + if !modified?("extinit.c", MTIMES) || IO.read("extinit.c") != src open("extinit.c", "w") {|f| f.print src} end @@ -268,6 +270,9 @@ rubies = [] } Dir.chdir ".." +if $extlist.size > 0 + rm_f(Config::CONFIG["LIBRUBY_SO"]) +end puts "making #{rubies.join(', ')}" $stdout.flush $mflags.concat(rubies) -- cgit v1.2.3