From c2e27a85d7a7b8d4ce734c88f9ff1493b87a5789 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 17 Sep 2020 18:21:30 +0200 Subject: [PATCH] build: Fix manual setting of CC. We want to set CC not only if its value comes from the default origin but also if it is undefined or empty. It's easiest to set it to "cc" whenever its current value is empty. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6674514..87c7d29 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ # increases performance and avoids hard-to-debug behaviour. .SUFFIXES: MAKEFLAGS += -Rr -ifeq ("$(origin CC)", "default") +CC := $(CC) +ifeq ($(strip $(CC)),) CC := cc endif -- 2.39.2