Browse Source

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 <[email protected]>
Steffen Jaeckel 2 years ago
parent
commit
e4adaafd90
1 changed files with 2 additions and 1 deletions
  1. 2 1
      makefile_include.mk

+ 2 - 1
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