0
我在检查我的ENVIRONMENT
变量是否为空,并且是development
或production
。Makefile - 如何检查变量是否为空并且是两个值之一
ENVIRONMENT ?= development
define ENV_CHECK
$(if $(or $(call seq,$(1),development),$(call seq,$(1),production)),true,false)
endef
.PHONY: test
test:
@echo "$(ENVIRONMENT)"
$(call ENV_CHECK,$(ENVIRONMENT))
我make test
失败,下面的错误
# make test
development
false
make: *** [test] Error 1