libtracefs: Fix the /dev/null redirection compatibility in Makefile
PATCH 1/1 libtracefs: Fix the /dev/null redirection compatibility in Makefile
"&> /dev/null" is bash shell syntax, use more compatible syntax to handle shell null redirection.
/bin/sh: 1: /root/linux/libtracefs/test: not found
In file included from /root/linux/libtracefs/test.c:1:/usr/local/include/tracefs/tracefs.h:11:10: fatal error: event-parse.h: No such file or directory
11 | #include <event-parse.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
Signed-off-by Haiyue Wang <[email protected]>
---
The same fix as for libtraceevent:
https://lore.kernel.org/linux-trace-devel/[email protected]/
--- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
@@ -274,8 +274,8 @@ define install_ld_config if $(LDCONFIG); then \ if ! grep -q "^$(libdir)$$" $(LD_SO_CONF_PATH)/* ; then \ $(CC) -o $(objtree)/test $(srctree)/test.c -I $(includedir_SQ) \ - -L $(libdir_SQ) -ltracefs &> /dev/null; \ - if ! $(objtree)/test &> /dev/null; then \ + -L $(libdir_SQ) -ltracefs > /dev/null 2>&1; \ + if ! $(objtree)/test > /dev/null 2>&1; then \ $(call print_install, trace.conf, $(LD_SO_CONF_PATH)) \ echo $(libdir_SQ) >> $(LD_SO_CONF_PATH)/trace.conf; \ $(LDCONFIG); \
Signature · 1 line
2.49.0