summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrgad Shaneh <orgads@gmail.com>2016-07-31 09:18:22 +0300
committerOrgad Shaneh <orgads@gmail.com>2016-11-16 09:08:27 +0200
commit22cc44d6b63e070cbff9770497f4fe6b3fa8d2a5 (patch)
tree9143c220a6b7a884e6ca520a808e6ca74f6c4eda
parentecc955157af5f0fa19bcd74caaf52ec3fa18f755 (diff)
downloadopenssl-new-22cc44d6b63e070cbff9770497f4fe6b3fa8d2a5.tar.gz
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)
-rwxr-xr-xutil/mklink.pl2
1 files changed, 1 insertions, 1 deletions
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: $!";