HAVE_C_DEF feeds its test program to the compiler with "echo -e". The $(shell ...) function runs under /bin/sh, which is dash on Debian and Ubuntu, and dash's echo has no -e option. It prints the flag literally, so the first line of the probe becomes -e #include which is no longer a preprocessor directive. The header is never included, the tested macro is never defined, and the probe reports 0 regardless of what the installed headers contain. The only user is HAVE_NEW_UBLK_INTF, so miniublk is skipped with Skip miniublk build due to missing new ublk interface(v6.4+) Use printf instead, which expands \n in any POSIX shell, and pass the substituted names as arguments so they are not reinterpreted. Signed-off-by: Mohamed Khalfella --- src/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index ef9c887..dd64694 100644 --- a/src/Makefile +++ b/src/Makefile @@ -8,8 +8,9 @@ HAVE_C_MACRO = $(shell if echo "$(H)include <$(1)>" | \ $(CC) $(CFLAGS) -E - 2>&1 /dev/null | grep $(2) > /dev/null 2>&1; \ then echo 1;else echo 0; fi) -HAVE_C_DEF = $(shell if echo -e "$(H)include <$(1)>\n$(H)ifdef $(2)\nHAVE_$(2)\n$(H)endif" | \ - $(CC) $(CFLAGS) -E - 2>&1 /dev/null | grep HAVE_$(2) > /dev/null 2>&1; \ +HAVE_C_DEF = $(shell if printf '$(H)include <%s>\n$(H)ifdef %s\nHAVE_%s\n$(H)endif\n' \ + "$(1)" "$(2)" "$(2)" | \ + $(CC) $(CFLAGS) -E - 2>/dev/null | grep HAVE_$(2) > /dev/null 2>&1; \ then echo 1;else echo 0; fi) C_TARGETS := \ -- 2.55.0