From e96937aa8948d73274b1b279345456c105a1516a Mon Sep 17 00:00:00 2001 From: Junjie Mao Date: Thu, 20 Oct 2022 23:45:18 +0800 Subject: [PATCH] Makefile: do not try to figure out BOARD and SCENARIO for cleanup The targets "clean" and "distclean" are special as they do not need BOARD or SCENARIO from users. This patch stops the guesswork of BOARD and SCENARIO if any of those two targets are specified. It is assumed that "clean" or "distclean" is not invoked with other targets at the same time. Tracked-On: #8259 Signed-off-by: Junjie Mao --- hypervisor/scripts/makefile/config.mk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hypervisor/scripts/makefile/config.mk b/hypervisor/scripts/makefile/config.mk index 4d86d6136..be82e5ce1 100644 --- a/hypervisor/scripts/makefile/config.mk +++ b/hypervisor/scripts/makefile/config.mk @@ -150,10 +150,6 @@ ifdef RELEASE endif endif -ifeq ($(findstring $(MAKECMDGOALS),distclean),) --include $(HV_CONFIG_MK) -endif - # BOARD/SCENARIO/BOARD_FILE/SCENARIO_FILE parameters sanity check. # # 1. Raise an error if BOARD/SCENARIO (or BOARD_FILE/SCENARIO_FILE) are partially given. @@ -188,9 +184,12 @@ endif # file. SCENARIO/SCENARIO_FILE are used in the same way. The following block translates the user-visible BOARD/SCENARIO # (which is multiplexed) to the internal representation. +ifeq ($(findstring $(MAKECMDGOALS),distclean),) +-include $(HV_CONFIG_MK) $(eval $(call determine_config,BOARD)) $(eval $(call determine_config,SCENARIO)) $(eval $(call determine_build_type,n)) +endif $(HV_BOARD_XML): $(BOARD_FILE) @echo "Board XML is fetched from $(realpath $(BOARD_FILE))"