From fee3169ba9688c7618a69bdfd312cdff63fb0d4a Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Sat, 28 Aug 2021 11:31:48 +0200 Subject: [PATCH] Makefile.include: warning not error if not curl, wget, unzip, 7z The following tools are not needed for every build, its only needed for a couple of packages like c25519, since most are fetched with git. --- Makefile.include | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile.include b/Makefile.include index 728393fab9c1..e6253e28532d 100644 --- a/Makefile.include +++ b/Makefile.include @@ -328,34 +328,34 @@ APPLICATION := $(strip $(APPLICATION)) ifeq (,$(and $(DOWNLOAD_TO_STDOUT),$(DOWNLOAD_TO_FILE))) ifeq (,$(WGET)) ifeq (0,$(shell which wget > /dev/null 2>&1 ; echo $$?)) - WGET := $(shell which wget) + WGET = $(call memoized,WGET,$(shell which wget)) endif endif ifeq (,$(CURL)) ifeq (0,$(shell which curl > /dev/null 2>&1 ; echo $$?)) - CURL := $(shell which curl) + CURL = $(call memoized,CURL,$(shell which curl)) endif endif ifeq (,$(WGET)$(CURL)) - $(error Neither wget nor curl is installed!) + $(warning Neither wget nor curl is installed!) endif ifeq (,$(DOWNLOAD_TO_STDOUT)) - DOWNLOAD_TO_STDOUT := $(if $(CURL),$(CURL) -s,$(WGET) -q -O-) + DOWNLOAD_TO_STDOUT ?= $(if $(CURL),$(CURL) -s,$(WGET) -q -O-) endif ifeq (,$(DOWNLOAD_TO_FILE)) - DOWNLOAD_TO_FILE := $(if $(WGET),$(WGET) -nv -c -O,$(CURL) -s -o) + DOWNLOAD_TO_FILE ?= $(if $(WGET),$(WGET) -nv -c -O,$(CURL) -s -o) endif endif ifeq (,$(UNZIP_HERE)) ifeq (0,$(shell which unzip > /dev/null 2>&1 ; echo $$?)) - UNZIP_HERE := $(shell which unzip) -q + UNZIP_HERE = $(call memoized,UNZIP_HERE,$(shell which unzip) -q) else ifeq (0,$(shell which 7z > /dev/null 2>&1 ; echo $$?)) - UNZIP_HERE := $(shell which 7z) x -bd + UNZIP_HERE = $(call memoized,UNZIP_HERE,$(shell which 7z) x -bd) else - $(error Neither unzip nor 7z is installed.) + $(warning Neither unzip nor 7z is installed.) endif endif endif