From 71f46f07245023e55a44b6c04100b72cd1bd8777 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 21 Mar 2004 23:21:31 +0000 Subject: * 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 --- mkconfig.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'mkconfig.rb') 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: -- cgit v1.2.3