Skip to content

Commit

Permalink
make: tools: find latest Win32OpenSSL_1_0_*
Browse files Browse the repository at this point in the history
Eliminates the need to modify make/tools.mk every time slproweb.com
updates their Win32OpenSSL packages

use curl to get https://slproweb.com/prodcuts/Win32OpenSSL.html
use grep to find lines with 'Win32OpenSSL-1_0_*'
use head to grab the first matching line (in case they decide to make
two versions available)
use sed to get the .exe's URL
  • Loading branch information
gregorydulin committed Sep 2, 2017
1 parent 60889f0 commit 9064d53
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion make/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,12 @@ endif

# OPENSSL download URL
ifdef WINDOWS
openssl_install: OPENSSL_URL := https://slproweb.com/download/Win32OpenSSL-1_0_2k.exe
openssl_install: OPENSSL_URL := https://slproweb.com$(shell \
curl -s https://slproweb.com/products/Win32OpenSSL.html \
| grep -P 'Win32OpenSSL-1_0_[0-9]*[A-Za-z].exe' \
| head -1 \
| sed 's|.*\(/download/Win32OpenSSL.*\.exe\).*|\1|g'\
)

openssl_install: OPENSSL_FILE := $(notdir $(OPENSSL_URL))
OPENSSL_DIR = $(TOOLS_DIR)/win32openssl
Expand Down

0 comments on commit 9064d53

Please sign in to comment.