summaryrefslogtreecommitdiff
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
commit71f46f07245023e55a44b6c04100b72cd1bd8777 (patch)
tree1524d0fff3f4b725eb87fca6131ec524d08f404f /mkconfig.rb
parent48dde6f3e6b3faf336a8734a21a7124115ed500f (diff)
* 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: svn+ssh://ci.ruby-lang.org/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 08f8dc166e..757a153f5f 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: