1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #16784 from fjmolinas/pr_curl_wget_unzip_7z_no_error

Makefile.include: only warn if not curl, wget, unzip, 7z
This commit is contained in:
Martine Lenders 2021-09-02 14:26:51 +02:00 committed by GitHub
commit ab6f24fb70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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