Makefile: prefer RELEASE=y|n over RELEASE=0|1

For clarity, we now prefer y|n over 0|1 as the values of boolean options on
make command lines. This patch applies this preference to the Makefile of
the device model and tools, while RELEASE=0|1 is still supported for
backward compatibility.

Tracked-On: #5772
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao
2021-02-28 10:59:52 +08:00
committed by wenlingz
parent 646e572d69
commit 0edaaa880f
6 changed files with 68 additions and 11 deletions

View File

@@ -9,9 +9,21 @@ OUT_DIR ?= $(BASEDIR)
BUILDDIR := $(OUT_DIR)/acrn-crashlog
CC ?= gcc
RM = rm
RELEASE ?= 0
ifeq ($(RELEASE),0)
ifndef RELEASE
override RELEASE := n
else
# Backward-compatibility for RELEASE=(0|1)
ifeq ($(RELEASE),1)
override RELEASE := y
else
ifeq ($(RELEASE),0)
override RELEASE := n
endif
endif
endif
ifeq ($(RELEASE),n)
CFLAGS += -DDEBUG_ACRN_CRASHLOG
endif