From patchwork Sat Jan 11 09:48:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11328797 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F243B6C1 for ; Sat, 11 Jan 2020 10:22:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C7BDB205F4 for ; Sat, 11 Jan 2020 10:22:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578738140; bh=CeEjd43JKGClgJcCmji5Y3DbpMh4kKHdTrFqyJWjyRE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=S5k3rddv4bW7qn9BIWxSzI4VWrKn9BbH0XMPKr/qHO1wW4xLiqMpXbrZqq3Bff63F CTphxS814rutJmeDzI9EkEq25dT4kquVgRA/JoF9sHvzRBb6hm4GW3wCNsqYkFhYkE UvCmkGa+9Pyd2PU8PE84Kad3e6IhGCkYrz5KMMls= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730609AbgAKKWR (ORCPT ); Sat, 11 Jan 2020 05:22:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:47010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730702AbgAKKWO (ORCPT ); Sat, 11 Jan 2020 05:22:14 -0500 Received: from localhost (unknown [62.119.166.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DDAFB20882; Sat, 11 Jan 2020 10:22:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578738133; bh=CeEjd43JKGClgJcCmji5Y3DbpMh4kKHdTrFqyJWjyRE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xLhsUdFk2InQqDh+tu7cA80zeK3kNxFlsBrNteGrOeCocPzual8AHgtgWs7JyG9sm 1Kpl7+g2bnYuDygHxEjIPgs3viLzzoL+8bORCkocWA+p/gbnhQnN0jEXBgD0joKMVP KttAfV0emGslbX+RBemLqhtNZoQ9HAe7to85FDB4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sudipm Mukherjee , "Steven Rostedt (VMware)" , linux-trace-devel@vger.kernel.org, Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.4 015/165] libtraceevent: Fix lib installation with O= Date: Sat, 11 Jan 2020 10:48:54 +0100 Message-Id: <20200111094922.308968341@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200111094921.347491861@linuxfoundation.org> References: <20200111094921.347491861@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: Sudip Mukherjee [ Upstream commit 587db8ebdac2c5eb3a8851e16b26f2e2711ab797 ] When we use 'O=' with make to build libtraceevent in a separate folder it fails to install libtraceevent.a and libtraceevent.so.1.1.0 with the error: INSTALL /home/sudip/linux/obj-trace/libtraceevent.a INSTALL /home/sudip/linux/obj-trace/libtraceevent.so.1.1.0 cp: cannot stat 'libtraceevent.a': No such file or directory Makefile:225: recipe for target 'install_lib' failed make: *** [install_lib] Error 1 I used the command: make O=../../../obj-trace DESTDIR=~/test prefix==/usr install It turns out libtraceevent Makefile, even though it builds in a separate folder, searches for libtraceevent.a and libtraceevent.so.1.1.0 in its source folder. So, add the 'OUTPUT' prefix to the source path so that 'make' looks for the files in the correct place. Signed-off-by: Sudipm Mukherjee Reviewed-by: Steven Rostedt (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20191115113610.21493-1-sudipm.mukherjee@gmail.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/lib/traceevent/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile index 5315f3787f8d..d008e64042ce 100644 --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile @@ -97,6 +97,7 @@ EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) LIB_TARGET = libtraceevent.a libtraceevent.so.$(EVENT_PARSE_VERSION) LIB_INSTALL = libtraceevent.a libtraceevent.so* +LIB_INSTALL := $(addprefix $(OUTPUT),$(LIB_INSTALL)) INCLUDES = -I. -I $(srctree)/tools/include $(CONFIG_INCLUDES) From patchwork Sat Jan 11 09:48:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11328799 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B63C46C1 for ; Sat, 11 Jan 2020 10:22:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 94284205F4 for ; Sat, 11 Jan 2020 10:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578738144; bh=qM1K8b9ABcWajK0PB6SL3OmVqdsQlj0LkxqO2SEIa10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=V131pi4x2HnokNd1mjiGhTp3UjmUc5dLDiep5B6hhKnpc/BpTp9Hc5F+JdxiUST1b gfkJC8nD2xKZrvcTSSZLT5D9F1CUbV5AX2Rj4tmE81kP2+TCkzaJ3Q26r7HcTV10uY 3GUBdCX8DUB0EtDjoFv29bLCGQQldR1O7rozT+Vk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730643AbgAKKWU (ORCPT ); Sat, 11 Jan 2020 05:22:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:47200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730333AbgAKKWS (ORCPT ); Sat, 11 Jan 2020 05:22:18 -0500 Received: from localhost (unknown [62.119.166.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 374112084D; Sat, 11 Jan 2020 10:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578738138; bh=qM1K8b9ABcWajK0PB6SL3OmVqdsQlj0LkxqO2SEIa10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BqejxFdYyMhpXyulmr+j4tU8S1aatpAZipBOmCIKBJK58P2QOvFcQ0K1oc+RzVHCm 5gi21eEwjDDc7LAci9eToznOZqQdKaXzY0hYb3LdnZ6Owin6yKBiCj3YV/Hpw5++kt lbPVGQkQw3gu1IiiFagtzKIhtRCpDPUhw/9yBFQI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sudipm Mukherjee , "Steven Rostedt (VMware)" , linux-trace-devel@vger.kernel.org, Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.4 016/165] libtraceevent: Copy pkg-config file to output folder when using O= Date: Sat, 11 Jan 2020 10:48:55 +0100 Message-Id: <20200111094922.361098351@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200111094921.347491861@linuxfoundation.org> References: <20200111094921.347491861@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: Sudip Mukherjee [ Upstream commit 15b3904f8e884e0d34d5f09906cf6526d0b889a2 ] 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 Reviewed-by: Steven Rostedt (VMware) 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 Signed-off-by: Sasha Levin --- tools/lib/traceevent/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile index d008e64042ce..ecf882308d8a 100644 --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile @@ -208,10 +208,11 @@ define do_install $(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2' 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}; \