From 98ee2b25f3f558367e210003a2466bd2e5921a17 Mon Sep 17 00:00:00 2001 From: eban Date: Tue, 29 Jul 2003 07:08:04 +0000 Subject: * instruby.rb (install): preserve the timestamp for Mac OS X ranlib problem. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 13 +++++++++---- instruby.rb | 17 ++++++++++------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index c10b3500f..7329856f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,16 @@ +Tue Jul 29 15:41:02 2003 WATANABE Hirofumi + + * instruby.rb (install): preserve the timestamp for Mac OS X ranlib + problem. + Tue Jul 29 12:22:28 2003 why the lucky stiff - * ext/syck/token.c: prefixed many constants and definitions with YAML_ to - avoid name clash. + * ext/syck/token.c: prefixed many constants and definitions + with YAML_ to avoid name clash. - * ext/syck/gram.c: ditto. + * ext/syck/gram.c: ditto. - * ext/syck/gram.h: ditto. + * ext/syck/gram.h: ditto. Tue Jul 29 12:15:37 2003 NAKAMURA Usaku diff --git a/instruby.rb b/instruby.rb index 3f39865ef..3b139941f 100644 --- a/instruby.rb +++ b/instruby.rb @@ -49,17 +49,20 @@ end parse_args() -include FileUtils +include FileUtils::Verbose include FileUtils::NoWrite if $dryrun @fileutils_output = STDOUT @fileutils_label = '' -alias makelink ln_sf -class << self - body = proc {|*args|super(*fu_update_option(args,:verbose=>true))} - for func in [:install, :makelink] - define_method(func, body) + +def install(src, dest, options = {}) + super + return if options[:noop] + fu_each_src_dest(src, dest) do |s, d| + st = File.stat(s) + File.utime(st.atime, st.mtime, d) end end + $made_dirs = {} def makedirs(dirs) dirs = fu_list(dirs) @@ -112,7 +115,7 @@ end if dll == lib and dll != arc for link in CONFIG["LIBRUBY_ALIASES"].split - makelink(dll, File.join(libdir, link)) + ln_sf(dll, File.join(libdir, link)) end end -- cgit