diff mbox series

[09/13] trace-cmd: Move the installing of libtracecmd to the lib/trace-cmd Makefile

Message ID 20201211171014.383612340@goodmis.org (mailing list archive)
State Accepted
Commit b48f2330ed103a3f88af32f74982c0fee7382a9d
Headers show
Series trace-cmd: Clean ups to the Makefile for using external libraries | expand

Commit Message

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

As a clean up, move the installation processing of libtracecmd libraries
into the lib/trace-cmd directory.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Makefile               | 5 ++---
 lib/trace-cmd/Makefile | 4 ++++
 2 files changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 041bd79b5aec..30528952740d 100644
--- a/Makefile
+++ b/Makefile
@@ -80,7 +80,7 @@  endif
 etcdir_SQ = '$(subst ','\'',$(etcdir))'
 
 export man_dir man_dir_SQ html_install html_install_SQ INSTALL
-export img_install img_install_SQ
+export img_install img_install_SQ libdir_SQ includedir_SQ
 export DESTDIR DESTDIR_SQ
 
 ifeq ($(prefix),$(HOME))
@@ -481,8 +481,7 @@  install_tracefs: $(LIBTRACEFS_STATIC_BUILD)
 	$(Q)$(call do_install,$(src)/include/tracefs/tracefs.h,$(includedir_SQ)/tracefs)
 
 install_libs: libs $(INSTALL_TRACEEVENT) $(INSTALL_TRACEFS)
-	$(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ))
-	$(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ)/trace-cmd)
+	$(Q)$(MAKE) -C $(src)/lib/trace-cmd/ $@
 
 doc:
 	$(MAKE) -C $(src)/Documentation all
diff --git a/lib/trace-cmd/Makefile b/lib/trace-cmd/Makefile
index cd66eaa8ea6c..96acdaf9aa27 100644
--- a/lib/trace-cmd/Makefile
+++ b/lib/trace-cmd/Makefile
@@ -59,6 +59,10 @@  $(DEPS): $(bdir)/.%.d: %.c
 
 $(OBJS): $(bdir)/%.o : $(bdir)/.%.d
 
+install_libs:
+	$(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ))
+	$(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ)/trace-cmd)
+
 dep_includes := $(wildcard $(DEPS))
 
 ifneq ($(dep_includes),)