From 22cc44d6b63e070cbff9770497f4fe6b3fa8d2a5 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 31 Jul 2016 09:18:22 +0300 Subject: [PATCH] mklink: Do not needlessly overwrite linked files... ... on systems without symlinks. Overwriting all the headers on each Configure causes full rebuild even if nothing has changed. Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/1370) --- util/mklink.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/mklink.pl b/util/mklink.pl index 61db12c68f..2df0453a17 100755 --- a/util/mklink.pl +++ b/util/mklink.pl @@ -57,7 +57,7 @@ foreach $file (@files) { if ($symlink_exists) { unlink "$from/$file"; symlink("$to/$file", "$from/$file") or $err = " [$!]"; - } else { + } elsif (-d "$from" && (!-f "$from/$file" || ((stat("$file"))[9] > (stat("$from/$file"))[9]))) { unlink "$from/$file"; open (OLD, "<$file") or die "Can't open $file: $!"; open (NEW, ">$from/$file") or die "Can't open $from/$file: $!"; -- 2.25.1