Linux block layer
 help / color / mirror / Atom feed
* [PATCH blktests] src/Makefile: escape '#' in HAVE_C_DEF
@ 2026-06-28 12:59 Sebastian Chlad
  2026-06-30  0:44 ` Shin'ichiro Kawasaki
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Chlad @ 2026-06-28 12:59 UTC (permalink / raw)
  To: linux-block; +Cc: shinichiro.kawasaki, Sebastian Chlad

Older make versions treat '#' as a comment, leaving the shell call
unterminated. Use $(H) instead.

Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
---

Reproduces on GNU Make 4.2.1 as:
`Makefile:11: *** unterminated call to function 'shell': missing ')'.  Stop`


 src/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile b/src/Makefile
index adfe3ef..d75daf1 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -8,7 +8,7 @@ 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#ifdef $(2)\nHAVE_$(2)\n#endif" | \
+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; \
 		then echo 1;else echo 0; fi)
 
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-30  0:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-28 12:59 [PATCH blktests] src/Makefile: escape '#' in HAVE_C_DEF Sebastian Chlad
2026-06-30  0:44 ` Shin'ichiro Kawasaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox