From f2844cc87244859f019774e2306a40d018411a21 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Thu, 5 Oct 2023 12:34:33 +0200 Subject: [PATCH] Fix make incompatibility Since make version 4.3 [0] the `#` sign inside a string is handled differently. Fix that. [0] https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html Signed-off-by: Steffen Jaeckel --- makefile_include.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makefile_include.mk b/makefile_include.mk index e4e7ad34..f76798c4 100644 --- a/makefile_include.mk +++ b/makefile_include.mk @@ -13,7 +13,8 @@ ifndef CROSS_COMPILE CROSS_COMPILE:= endif -ifneq (,$(shell printf "#ifdef __clang__\nCLANG\n#endif\n" | $(CC) -E - | grep CLANG)) +H := \# +ifeq (CLANG,$(shell printf "$(H)ifdef __clang__\nCLANG\n$(H)endif\n" | $(CC) -E - | grep CLANG)) CC_IS_CLANG := 1 else CC_IS_CLANG := 0