diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-12-20 17:46:23 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-12-20 17:46:23 +0000 |
commit | ca50ccf991031c8d96b725a7cf210009f2cf4f8b (patch) | |
tree | b1ad2f3d6044ba367cc29d4d11df37679d0118f1 /infrastructure | |
parent | 74b90014c4737a094d901d5c86dfaa815a2c3176 (diff) |
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.
Diffstat (limited to 'infrastructure')
-rwxr-xr-x | infrastructure/mingw/compile-boxbackup-cygwin.sh | 12 |
1 files changed, 10 insertions, 2 deletions
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 ) |