summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLukasz Pawelczyk <l.pawelczyk@samsung.com>2017-05-04 12:09:54 +0200
committerLukasz Pawelczyk <l.pawelczyk@samsung.com>2017-05-04 12:09:54 +0200
commit42400a3c53dd8996817c46cb390e8320c800f6cf (patch)
tree754d6a069d40ae83da8a60b0a04ba3e3a4d3f475 /util
parentccded75fc816019781e39dce85d6494b6c6c9c37 (diff)
downloadopenssl-42400a3c53dd8996817c46cb390e8320c800f6cf.tar.gz
openssl-42400a3c53dd8996817c46cb390e8320c800f6cf.tar.bz2
openssl-42400a3c53dd8996817c46cb390e8320c800f6cf.zip
Imported Upstream version 1.0.2kupstream/1.0.2k
Diffstat (limited to 'util')
-rwxr-xr-xutil/domd11
-rwxr-xr-xutil/mklink.pl8
2 files changed, 14 insertions, 5 deletions
diff --git a/util/domd b/util/domd
index 95bb1b0..bc2a85f 100755
--- a/util/domd
+++ b/util/domd
@@ -11,7 +11,9 @@ if [ "$1" = "-MD" ]; then
fi
if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi
-cp Makefile Makefile.save
+# Preserve Makefile timestamp by moving instead of copying (cp -p is GNU only)
+mv Makefile Makefile.save
+cp Makefile.save Makefile
# fake the presence of Kerberos
touch $TOP/krb5.h
if ${MAKEDEPEND} --version 2>&1 | grep "clang" > /dev/null ||
@@ -32,7 +34,12 @@ else
${PERL} $TOP/util/clean-depend.pl < Makefile > Makefile.new
RC=$?
fi
-mv Makefile.new Makefile
+if ! cmp -s Makefile.save Makefile.new; then
+ mv Makefile.new Makefile
+else
+ mv Makefile.save Makefile
+ rm -f Makefile.new
+fi
# unfake the presence of Kerberos
rm $TOP/krb5.h
diff --git a/util/mklink.pl b/util/mklink.pl
index 61db12c..a937606 100755
--- a/util/mklink.pl
+++ b/util/mklink.pl
@@ -55,9 +55,11 @@ if ($^O eq "msys") { $symlink_exists=0 };
foreach $file (@files) {
my $err = "";
if ($symlink_exists) {
- unlink "$from/$file";
- symlink("$to/$file", "$from/$file") or $err = " [$!]";
- } else {
+ if (!-l "$from/$file") {
+ unlink "$from/$file";
+ symlink("$to/$file", "$from/$file") or $err = " [$!]";
+ }
+ } 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: $!";