From ca50ccf991031c8d96b725a7cf210009f2cf4f8b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 20 Dec 2015 17:46:23 +0000 Subject: Fix OpenSSL makefile caching against version upgrades. Cache the previous OpenSSL makefile for its timestamp, but rebuild it each time, compare to the cached one, and invalidate if necessary. --- infrastructure/mingw/compile-boxbackup-cygwin.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'infrastructure') diff --git a/infrastructure/mingw/compile-boxbackup-cygwin.sh b/infrastructure/mingw/compile-boxbackup-cygwin.sh index 38e94735..02b05852 100755 --- a/infrastructure/mingw/compile-boxbackup-cygwin.sh +++ b/infrastructure/mingw/compile-boxbackup-cygwin.sh @@ -26,9 +26,17 @@ wget -c $openssl_source/$latest_openssl.tar.gz tar xzf $latest_openssl.tar.gz --exclude $latest_openssl/Makefile ( cd $latest_openssl - [ -r Makefile ] || \ - ./Configure --prefix=$install_prefix mingw64 \ + ./Configure --prefix=$install_prefix mingw64 \ --cross-compile-prefix=$compiler_prefix- + + # Avoid recompilation by caching the previous Makefile for its timestamp, + # and reusing if it hasn't changed. + if diff --brief Makefile ../openssl.makefile.cache; then + cp -a ../openssl.makefile.cache Makefile + else + cp -a Makefile ../openssl.makefile.cache + fi + make make install_sw ) -- cgit v1.2.3