[PATCH v1 1/5] Makefile: specify default goal using the variable .DEFAULT_GOAL


Junjie Mao
 

The target "default" in hypervisor/Makefile is just an alias of the target
"all" in order to make "all" being the default goal. This patch replaces
that duplicate target and specifies the default goal by defining the
variable .DEFAULT_GOAL instead.

Signed-off-by: Junjie Mao <junjie.mao@...>
---
hypervisor/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hypervisor/Makefile b/hypervisor/Makefile
index b72849720..a077eb36d 100644
--- a/hypervisor/Makefile
+++ b/hypervisor/Makefile
@@ -40,9 +40,6 @@ ARCH_ASFLAGS :=
ARCH_ARFLAGS :=
ARCH_LDFLAGS :=

-.PHONY: default
-default: all
-
include scripts/makefile/config.mk

BOARD_INFO_DIR := $(HV_CONFIG_DIR)/boards
@@ -566,3 +563,5 @@ $(VM_CFG_C_OBJS): %.o: %.c header
$(HV_OBJDIR)/%.o: %.S header
[ ! -e $@ ] && mkdir -p $(dir $@) && mkdir -p $(HV_MODDIR); \
$(CC) $(patsubst %, -I%, $(INCLUDE_PATH)) -I. $(ASFLAGS) $(ARCH_ASFLAGS) -c $< -o $@ -MMD -MT $@
+
+.DEFAULT_GOAL := all
--
2.30.2


Geoffroy Van Cutsem
 

+1!

-----Original Message-----
From: acrn-dev@... <acrn-dev@...> On
Behalf Of Junjie Mao
Sent: Thursday, October 20, 2022 3:54 pm
To: acrn-dev@...
Subject: [acrn-dev] [PATCH v1 1/5] Makefile: specify default goal using the
variable .DEFAULT_GOAL

The target "default" in hypervisor/Makefile is just an alias of the target "all"
in order to make "all" being the default goal. This patch replaces that
duplicate target and specifies the default goal by defining the variable
.DEFAULT_GOAL instead.

Signed-off-by: Junjie Mao <junjie.mao@...>
---
hypervisor/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hypervisor/Makefile b/hypervisor/Makefile index
b72849720..a077eb36d 100644
--- a/hypervisor/Makefile
+++ b/hypervisor/Makefile
@@ -40,9 +40,6 @@ ARCH_ASFLAGS :=
ARCH_ARFLAGS :=
ARCH_LDFLAGS :=

-.PHONY: default
-default: all
-
include scripts/makefile/config.mk

BOARD_INFO_DIR := $(HV_CONFIG_DIR)/boards @@ -566,3 +563,5 @@
$(VM_CFG_C_OBJS): %.o: %.c header
$(HV_OBJDIR)/%.o: %.S header
[ ! -e $@ ] && mkdir -p $(dir $@) && mkdir -p $(HV_MODDIR); \
$(CC) $(patsubst %, -I%, $(INCLUDE_PATH)) -I. $(ASFLAGS)
$(ARCH_ASFLAGS) -c $< -o $@ -MMD -MT $@
+
+.DEFAULT_GOAL := all
--
2.30.2