From 0fc7018d0be707c3f48fe78ef6276636d7eae65a Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 4 Jun 2015 16:33:27 +0100 Subject: [PATCH] kvmtool: Makefile: Don't defer error output on unsupported architectures Having ARCH defined to something unknown or trying to compile kvmtool on an unsupported architecture barfs quite late, actually after checking for libraries. This gives a lot of messages, but the only useful one (architecture not supported) is easily overseen. Abort early if ARCH contains an unknown architecture name. Signed-off-by: Andre Przywara Signed-off-by: Will Deacon --- Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 9a7ecda..6110b8e 100644 --- a/Makefile +++ b/Makefile @@ -192,9 +192,7 @@ endif ### ifeq (,$(ARCH_INCLUDE)) - UNSUPP_ERR = @echo "This architecture is not supported in kvmtool." && exit 1 -else - UNSUPP_ERR = + $(error This architecture ($(ARCH)) is not supported in kvmtool) endif ### @@ -341,10 +339,7 @@ ifneq ($(WERROR),0) CFLAGS += -Werror endif -all: arch_support_check $(PROGRAM) $(PROGRAM_ALIAS) $(GUEST_INIT) - -arch_support_check: - $(UNSUPP_ERR) +all: $(PROGRAM) $(PROGRAM_ALIAS) $(GUEST_INIT) # CFLAGS used when building objects # This is intentionally not assigned using :=