From 2e42f37a020ce9c94f7d41e69b3e3ffec43a54ce Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 31 Aug 2012 05:27:44 +0000 Subject: [PATCH] mkmf.rb: fix race conditions at install-ext * lib/mkmf.rb (create_makefile): fix race conditions at install-ext. target files need to depend on destination directory timestamp files, not phony trgets. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ lib/mkmf.rb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 298d83e97a..f6c7125ed8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Aug 31 14:27:39 2012 Nobuyoshi Nakada + + * lib/mkmf.rb (create_makefile): fix race conditions at install-ext. + target files need to depend on destination directory timestamp + files, not phony trgets. + Fri Aug 31 14:03:45 2012 Nobuyoshi Nakada * vm_trace.c (clean_hooks): do not access freed memory. diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 367b344095..39113b5130 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -2152,8 +2152,8 @@ static: $(STATIC_LIB)#{$extout ? " install-rb" : ""} end for f in files dest = "#{dir}/#{File.basename(f)}" - mfile.print("install-rb#{sfx}: #{dest} #{timestamp_file(dir)}\n") - mfile.print("#{dest}: #{f}\n") + mfile.print("install-rb#{sfx}: #{dest}\n") + mfile.print("#{dest}: #{f} #{timestamp_file(dir)}\n") mfile.print("\t$(Q) $(#{$extout ? 'COPY' : 'INSTALL_DATA'}) #{f} $(@D#{sep})\n") if defined?($installed_list) and !$extout mfile.print("\t@echo #{dest}>>$(INSTALLED_LIST)\n")