From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> Instead of installing libtracecmd.pc when doing the install of the executable, install it durin "make install_libs". Also do some clean ups around the building and installin gof libtracecmd.pc. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- Makefile | 8 +++----- lib/trace-cmd/Makefile | 5 ++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 038276b67464..c1192da4f049 100644 --- a/Makefile +++ b/Makefile @@ -207,6 +207,8 @@ obj := $(objtree) PKG_CONFIG_SOURCE_FILE = libtracecmd.pc PKG_CONFIG_FILE := $(addprefix $(BUILD_OUTPUT)/,$(PKG_CONFIG_SOURCE_FILE)) +export pkgconfig_dir PKG_CONFIG_FILE + kshark-dir = $(src)/kernel-shark export prefix bindir src obj kshark-dir @@ -439,7 +441,7 @@ install_python: force install_bash_completion: force $(Q)$(call do_install_data,$(src)/tracecmd/trace-cmd.bash,$(BASH_COMPLETE_DIR)) -install_cmd: all_cmd install_plugins install_python install_bash_completion install_pkgconfig +install_cmd: all_cmd install_plugins install_python install_bash_completion $(Q)$(call do_install,$(obj)/tracecmd/trace-cmd,$(bindir_SQ)) install: install_cmd @@ -468,10 +470,6 @@ install_doc: install_doc_gui: $(MAKE) -C $(kshark-dir)/Documentation install -install_pkgconfig: $(PKG_CONFIG_FILE) - $(Q)$(call , $(PKG_CONFIG_FILE)) \ - $(call do_install_pkgconfig_file,$(prefix)) - clean: $(RM) *.o *~ *.a *.so .*.d $(RM) tags TAGS cscope* $(PKG_CONFIG_SOURCE_FILE) diff --git a/lib/trace-cmd/Makefile b/lib/trace-cmd/Makefile index 3b8087f66db5..ec6ab29923db 100644 --- a/lib/trace-cmd/Makefile +++ b/lib/trace-cmd/Makefile @@ -84,7 +84,10 @@ define install_ld_config endef endif # DESTDIR = "" -install_libs: +install_pkgconfig: $(PKG_CONFIG_FILE) + $(Q)$(call do_install_pkgconfig_file,$(prefix)) + +install_libs: install_pkgconfig $(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ)) $(Q)$(call print_install,$(LIBTRACECMD_SHARED_VERSION),$(DESTDIR)$(libdir_SQ)) $(Q)cp -fpR $(LIBTRACECMD_SHARED_VERSION) $(DESTDIR)$(libdir_SQ) -- 2.29.2