From a39aafced02d1c52760b3e948464a8041787d36f Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Fri, 19 Jun 2015 14:03:30 -0400 Subject: Search for sha256sum, use it if we found it, warn otherwise. --- GNUmakefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index cb10c3f..447589d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -9,6 +9,8 @@ BUILD := ${TOP}/build OUTPUT := ${BUILD}/sqlite3.h ${BUILD}/.libs/libsqlite3.a ${BUILD}/sqlite3 TARGETS := $(notdir ${OUTPUT}) +SHA256SUM := $(firstword $(wildcard /usr/local/bin/sha256sum /usr/local/bin/gsha256sum /usr/bin/sha256sum)) + all: ${TARGETS} clean: @@ -21,7 +23,11 @@ ${TARBALL}: wget ${URL} ${BUILD}/.build_done: ${TARBALL} GNUmakefile - sha256sum --check Checksums +ifeq "" "${SHA256SUM}" + @echo "Couldn't find sha256sum, not verifying distribution checksum" +else + ${SHA256SUM} --check Checksums +endif rm -rf ${BUILD} mkdir ${BUILD} cd ${BUILD}; tar -xf ${TARBALL} --strip-components=1 -- cgit v1.2.3