mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
Makefile: using optbool
This commit is contained in:
8
Makefile
8
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) \
|
||||
|
||||
Reference in New Issue
Block a user