From patchwork Tue Dec 3 13:56:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 11271335 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 10EF1112B for ; Tue, 3 Dec 2019 13:57:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E3B082080A for ; Tue, 3 Dec 2019 13:57:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575381452; bh=5HsrQ91rsRMjs222G21GWWlJX7cH7KjfErCjL0wtVL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=L/e9irali3QlCFFpGNDFKAhuNMtRxxw5T5c45+k2ey+ohHYGiLeaTtmUgW/sujJAe XcCTfvYAjX/JPLqf24dIj6g1nsDEGLE//ff3GO0KwNhzT5yyyz7iMQ+07p3TomweV+ HLdRumzo9qX1h0A6DK+5fPjNVZjzbB26lSJOEjQY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727219AbfLCN51 (ORCPT ); Tue, 3 Dec 2019 08:57:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:35542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbfLCN50 (ORCPT ); Tue, 3 Dec 2019 08:57:26 -0500 Received: from quaco.ghostprotocols.net (unknown [179.97.35.50]) (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 86C5020409; Tue, 3 Dec 2019 13:57:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575381446; bh=5HsrQ91rsRMjs222G21GWWlJX7cH7KjfErCjL0wtVL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vq4mOm1zFHUgzh98S2HHxpLnjTV27QxJldI7qAayvC9PWKmYe67CQdFM9lZM0b48g EHsGLLLYGz48ZiJNS4U/qTmHdfaYDt+UR2R2YT/56yIXqKpLplLRj+7Tx1vBaPUOXx NbJzOY+nzUia2YSncSU7WvVxcOGYZr0U79Wb/FTk= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Sudip Mukherjee , Steven Rostedt , linux-trace-devel@vger.kernel.org, Arnaldo Carvalho de Melo Subject: [PATCH 23/23] libtraceevent: Copy pkg-config file to output folder when using O= Date: Tue, 3 Dec 2019 10:56:06 -0300 Message-Id: <20191203135606.24902-24-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191203135606.24902-1-acme@kernel.org> References: <20191203135606.24902-1-acme@kernel.org> 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 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 --- 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 83446fe2cf01..c5a03356a999 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}; \