| From f4169af8eadfd7d9ef28bfd674c176f446485839 Mon Sep 17 00:00:00 2001 |
| From: Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
| Date: Fri, 15 Nov 2019 11:36:10 +0000 |
| Subject: [PATCH] libtraceevent: Copy pkg-config file to output folder when |
| using O= |
| |
| commit 15b3904f8e884e0d34d5f09906cf6526d0b889a2 upstream. |
| |
| When we use 'O=' with make to build libtraceevent in a separate folder |
| it still copies 'libtraceevent.pc' to its source folder. Modify the |
| Makefile so that it uses the output folder to copy the pkg-config file |
| and install from there. |
| |
| Signed-off-by: Sudipm Mukherjee <sudipm.mukherjee@gmail.com> |
| Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> |
| Cc: linux-trace-devel@vger.kernel.org |
| Link: http://lore.kernel.org/lkml/20191115113610.21493-2-sudipm.mukherjee@gmail.com |
| Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile |
| index c1a6a5748fe4..1864b11c1117 100644 |
| --- a/tools/lib/traceevent/Makefile |
| +++ b/tools/lib/traceevent/Makefile |
| @@ -278,10 +278,11 @@ define do_generate_dynamic_list_file |
| fi |
| endef |
| |
| -PKG_CONFIG_FILE = libtraceevent.pc |
| +PKG_CONFIG_SOURCE_FILE = libtraceevent.pc |
| +PKG_CONFIG_FILE := $(addprefix $(OUTPUT),$(PKG_CONFIG_SOURCE_FILE)) |
| define do_install_pkgconfig_file |
| if [ -n "${pkgconfig_dir}" ]; then \ |
| - cp -f ${PKG_CONFIG_FILE}.template ${PKG_CONFIG_FILE}; \ |
| + cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE}; \ |
| sed -i "s|INSTALL_PREFIX|${1}|g" ${PKG_CONFIG_FILE}; \ |
| sed -i "s|LIB_VERSION|${EVENT_PARSE_VERSION}|g" ${PKG_CONFIG_FILE}; \ |
| sed -i "s|LIB_DIR|${libdir}|g" ${PKG_CONFIG_FILE}; \ |
| -- |
| 2.7.4 |
| |