diff mbox series

[2/8] libtracefs: Use $(objtree) instead of $(OUTPUT) for ld.so test

Message ID 20201216201134.148017704@goodmis.org (mailing list archive)
State Accepted
Commit 8acb8fa7cf391b2b069cda320592f54547def30b
Headers show
Series libtracefs: More Makefile updates to make packaging the library easier | expand

Commit Message

Steven Rostedt Dec. 16, 2020, 8:11 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

Use the variable $(objtree) to build the test program in the O=path
directory, as there is no $(OUTPUT) variable defined.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index a7d58081bf4b..f675d5e60db1 100644
--- a/Makefile
+++ b/Makefile
@@ -224,14 +224,14 @@  ifeq ("$(DESTDIR)", "")
 define install_ld_config
 	$(LDCONFIG); \
 	if ! grep "^$(libdir)$$" $(LD_SO_CONF_PATH)/* &> /dev/null ; then \
-		$(CC) -o $(OUTPUT)test $(srctree)/test.c -I $(includedir_SQ) \
+		$(CC) -o $(objtree)/test $(srctree)/test.c -I $(includedir_SQ) \
 			-L $(libdir_SQ) -ltracefs &> /dev/null; \
-		if ! $(OUTPUT)test &> /dev/null; then \
+		if ! $(objtree)/test &> /dev/null; then \
 			$(call print_install, trace.conf, $(LD_SO_CONF_PATH)) \
 			echo $(libdir_SQ) >> $(LD_SO_CONF_PATH)/trace.conf; \
 			$(LDCONFIG); \
 		fi; \
-		$(RM) $(OUTPUT)test; \
+		$(RM) $(objtree)/test; \
 	fi
 endef
 else