summaryrefslogtreecommitdiff
path: root/ext/extmk.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-18 08:34:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-18 08:34:45 +0000
commitc1c86a37df4afa6a4c9f9a55d8fe4a6667b4032d (patch)
tree3eb4b921b9040e659afc237b12bd08cf696fc2bd /ext/extmk.rb
parente06379839c3a47e7da1da572047616231e0d16ad (diff)
* 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
Diffstat (limited to 'ext/extmk.rb')
-rw-r--r--ext/extmk.rb9
1 files changed, 7 insertions, 2 deletions
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)