summaryrefslogtreecommitdiffstats
path: root/mkconfig.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-21 23:21:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-21 23:21:31 +0000
commitdf00944c965d651fc17346ef6b700e01081935d9 (patch)
tree1524d0fff3f4b725eb87fca6131ec524d08f404f /mkconfig.rb
parent25cb5862ab7b660176eae186a85a55ad9f088135 (diff)
downloadruby-df00944c965d651fc17346ef6b700e01081935d9.tar.gz
ruby-df00944c965d651fc17346ef6b700e01081935d9.tar.xz
ruby-df00944c965d651fc17346ef6b700e01081935d9.zip
* Makefile.in, */Makefile.sub, common.mk: extract common portions.
* Makefile.in, cygwin/GNUmakefile.in, */Makefile.sub (RBCONFIG): separated time stamp file for rbconfig.rb. * configure.in: append common.mk to Makefile. * mkconfig.rb: keep mtime of rbconfig.rb if unchanged. * win32/rm.bat: remove multiple files. * wince/mkconfig_wce.rb: use fake.rb instead. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mkconfig.rb')
-rw-r--r--mkconfig.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/mkconfig.rb b/mkconfig.rb
index 08f8dc166..757a153f5 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -132,6 +132,17 @@ EOS
$stdout.flush
$stdout.reopen($orgout)
config.close
-File.rename(rbconfig_rb_tmp, rbconfig_rb)
+if $timestamp and
+ File.exist?(rbconfig_rb) and
+ FileUtils.compare_file(rbconfig_rb, rbconfig_rb_tmp)
+ puts "#{rbconfig_rb} unchanged"
+ File.unlink(rbconfig_rb_tmp)
+else
+ puts "#{rbconfig_rb} updated"
+ File.rename(rbconfig_rb_tmp, rbconfig_rb)
+end
+if String === $timestamp
+ FileUtils.touch($timestamp)
+end
# vi:set sw=2: