In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/989c251f8fe733cc99daad2f2b7e558ee5938b48?hp=33be4c6111bea619c1662d201ad9e3914c2013e5>
- Log ----------------------------------------------------------------- commit 989c251f8fe733cc99daad2f2b7e558ee5938b48 Author: Daniel Dragan <[email protected]> Date: Sun Dec 28 15:59:38 2014 -0500 fix a broken optimization in win32/config_h.PL to stop excessive rebuilding In commit 137443ea0a config_h.PL was introduced. There is no ML archive from that time of the actual patches or their rational. From day 1 of config_h.PL for the root config.h, it didn't copy the new one config.h to the normal location of config.h if the files matched. This prevents redundant dirtying of all core moudules with the "Makefile out-of-date with respect to "/make clean/rerunning of makefile.pl /new make all cycle. But the optimization didn't work in practice since the modules declare a dependency on /lib/CORE/config.h not /config.h. Previously "touch"ing /win32/Makefile would trigger a mass rebuild, even if config.h's contents are the same. Now only if the new after "touch"ing /win32/makefile config.h is different from the old config.h , will a mass rebuild of module be triggered. This makes reduced the amount of time core devs have to spend to work on Win32 perl. ----------------------------------------------------------------------- Summary of changes: win32/config_h.PL | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/win32/config_h.PL b/win32/config_h.PL index 6b7fbda..03dddb3 100644 --- a/win32/config_h.PL +++ b/win32/config_h.PL @@ -79,10 +79,11 @@ while (<SH>) close(H); close(SH); - -chmod(0666,"$opt{CORE_DIR}/$opt{CONFIG_H}"); -copy("$file.new","$opt{CORE_DIR}/$opt{CONFIG_H}") || die "Cannot copy:$!"; -chmod(0444,"$opt{CORE_DIR}/$opt{CONFIG_H}"); +if (compare("$file.new","$opt{CORE_DIR}/$opt{CONFIG_H}")) { + chmod(0666,"$opt{CORE_DIR}/$opt{CONFIG_H}"); + copy("$file.new","$opt{CORE_DIR}/$opt{CONFIG_H}") || die "Cannot copy:$!"; + chmod(0444,"$opt{CORE_DIR}/$opt{CONFIG_H}"); +} if (compare("$file.new",$file)) { -- Perl5 Master Repository
