Skip to contentSkip to conversation

libtracefs: Have cunit test in Makefile use /dev/null in the output

PATCH New Steven Rostedt 1 participant 1 message Dec 1, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libtracefs: Have cunit test in Makefile use /dev/null in the output

From: "Steven Rostedt (VMware)" <[email protected]>

The test command in the Makefile to see if cunit is installed use $(CC) without -o /dev/null, leaving an "a.out" in directory.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 3158698..c5b13ca 100644
@@ -150,7 +150,7 @@ CFLAGS ?= -g -Wall
 CPPFLAGS ?=
 LDFLAGS ?=
 
-CUNIT_INSTALLED := $(shell if (printf "$(pound)include <CUnit/Basic.h>\n void main(){CU_initialize_registry();}" | $(CC) -x c - -lcunit >/dev/null 2>&1) ; then echo 1; else echo 0 ; fi)
+CUNIT_INSTALLED := $(shell if (printf "$(pound)include <CUnit/Basic.h>\n void main(){CU_initialize_registry();}" | $(CC) -x c - -lcunit -o /dev/null >/dev/null 2>&1) ; then echo 1; else echo 0 ; fi)
 export CUNIT_INSTALLED
 
 export CFLAGS
Signature · 1 line
2.25.4