From 43602b0d789fa45be08c7c76632be5bf693f126a Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Wed, 31 Jul 2019 04:47:02 +0300 Subject: Makefile: using optbool --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 56e44d5e..95cbe44f 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,12 @@ TESTENV_LOOP ?= /dev/loop7 USTREAMER_MIN_VERSION ?= 1.1 +# ===== +define optbool +$(filter $(shell echo $(1) | tr A-Z a-z),yes on 1) +endef + + # ===== all: @ echo "Useful commands:" @@ -31,7 +37,7 @@ all: testenv: docker build \ - $(if $(NC),--no-cache,) \ + $(if $(call optbool,$(NC)),--no-cache,) \ --rm \ --tag $(TESTENV_IMAGE) \ --build-arg USTREAMER_MIN_VERSION=$(USTREAMER_MIN_VERSION) \ -- cgit v1.2.3