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 <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1370)
This commit is contained in:
Orgad Shaneh 2016-07-31 09:18:22 +03:00
parent ecc955157a
commit 22cc44d6b6
1 changed files with 1 additions and 1 deletions

View File

@ -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: $!";