mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-16 14:28:56 +00:00
Makefile: clean up unnecessary phony targets
Phony targets are mostly for recipes that are expected to be invoked directly from the command line as a target and will always be executed. As a result, it is in most cases not appropriate for a real file target to to depend on a phony one, as that means the file will always be regenerated. In the Makefile today, however, dependencies on phony targets are common and cause the hypervisor to be fully rebuilt regardless of whether an existing build exists or not. This patch cleans up the following phony targets which are not meant to be targets from the command line. - pre_build: This target has three outputs, namely the prebuild checker, the ACPI tables for pre-launched VMs and the serial.conf. It is split into three targets, one for each output. - headers: This target is an alias of dynamically-generated header files. It is replaced with a variable so that targets depending on "header" now depends on the actual header files generated. With this patch, make will only rebuild modified files and targets depending on them directly or indirectly. Tracked-On: #8259 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -14,8 +14,8 @@ ifeq ($(SCENARIO),)
|
||||
$(error please specify SCENARIO for the build!)
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_DIR),)
|
||||
$(error please specify VM configs directory! )
|
||||
ifeq ($(CHECKER_OUT),)
|
||||
$(error please specify the path to the generated checker! )
|
||||
endif
|
||||
|
||||
BOARD_INFO_DIR := $(HV_OBJDIR)/configs/boards
|
||||
@@ -52,4 +52,4 @@ default: $(PRE_BUILD_SRCS)
|
||||
else \
|
||||
echo "Found $(BOARD) configuration for SCENARIO $(SCENARIO) under $(BOARD_CFG_DIR)"; \
|
||||
fi;
|
||||
$(CC) $(PRE_BUILD_SRCS) $(PRE_BUILD_INCLUDE) $(PRE_BUILD_CFLAGS) -o $(HV_OBJDIR)/hv_prebuild_check.out
|
||||
$(CC) $(PRE_BUILD_SRCS) $(PRE_BUILD_INCLUDE) $(PRE_BUILD_CFLAGS) -o $(CHECKER_OUT)
|
||||
|
Reference in New Issue
Block a user