build: Fix manual setting of CC.
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 17 Sep 2020 16:21:30 +0000 (18:21 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 23 Sep 2020 16:59:10 +0000 (18:59 +0200)
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

index 66745146bfabff1e9bbc947cdbcfeaec1b9959a1..87c7d29a0c35afa394764d523911a7d9d9c661d7 100644 (file)
--- 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