config_tools: change representation of build types

Instead of using a Boolean variable indicating whether a build is for debug
or release, it is more intuitive to specify the build types as "debug" or
"release".

This patch converts the config item RELEASE to BUILD_TYPE which takes
"debug" or "release" as of now.

The generated header and makefile still uses RELEASE, and the command line
option RELEASE=<y or n> is also preserved.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao
2022-02-25 21:59:48 +08:00
committed by acrnsi-robot
parent 7a1fbcf51f
commit 7ad9596dd6
28 changed files with 58 additions and 34 deletions

View File

@@ -92,7 +92,11 @@ ifdef RELEASE
ifneq ($(RELEASE),$(CONFIG_RELEASE))
$$(warning The command line sets RELEASE to be '$(RELEASE)', but an existing build is configured with '$(CONFIG_RELEASE)')
$$(warning The configuration will be modified for RELEASE=$(RELEASE))
$$(shell sed -i "s@\(<RELEASE.*>\)[yn]\(</RELEASE>\)@\1$(RELEASE)\2@g" $(HV_SCENARIO_XML))
ifeq ($(RELEASE),y)
$$(shell sed -i "s@\(<BUILD_TYPE.*>\).*\(</BUILD_TYPE>\)@\1release\2@g" $(HV_SCENARIO_XML))
else
$$(shell sed -i "s@\(<BUILD_TYPE.*>\).*\(</BUILD_TYPE>\)@\1debug\2@g" $(HV_SCENARIO_XML))
endif
endif
endif
else