Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2801334yba; Sat, 18 May 2019 03:18:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyA9Qv39W/JnyodhKRoNrw3Sn7kFwBQZMPTh+MQ8D/6stm3TuidEgy5UZxdJ69aXPSY01uJ X-Received: by 2002:a63:2260:: with SMTP id t32mr24224626pgm.222.1558174725949; Sat, 18 May 2019 03:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558174725; cv=none; d=google.com; s=arc-20160816; b=Hw127bKtLaaz5FJKKQWTbUxrM0jbcxePzIScJr+V5XfHSZcVljZAvH9aXpSDKI3Ie+ BADVlEtRSKT7RsrXBHj+ZRt+DSrznMZOZmLcZ16TrF1B0qRAJUK/k7S05nbu0W9VeD3b A6zG5nxNIwF+0p53FPuQGQeKsOrooKNN74NYaNOGglKq7buQ9Q4TNAPypWiXQI1WoyAh uwq2z06hdJhcjpi87m/pvGm49bHFhNWBek05yFMLqvCMauHVTrbgHqZ2d6yY2hasifMp Zm7wf0PUyA8PYlQhBN1XFK5IpUcr/Qp9K1knktrVuTYXBvlBw13Z+Pr7iEs7iXNUEy6k SzYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=c84VOG927arrQiYWVDPzoCWqjYqqB8ZFryhbVYEK+xo=; b=YVAb9Mh1F9qe/F7ZadxSbUVuM3lsKfLosjVnJFXwkzXTDtiRcfmbAHigufSzTTkW+g ROtJPFDllJU6H5W/q7f+tLOI1fGRkhDdD7AutEsjb/vZ6B0k089hovGiUXWgjgKDB7+y pseKJtNcmo5HtfZAD0N1mqz8c+zQQTPvL1aIv/KgO8B3YEVvmi5eeX24OZp82Q/ocMyv LeWYi/7az593tstP4hBB56uISbXUB7EIotW+LZqKK7LKA4xmGCHWubk8OgRET0SMdDBa COIXdbsf6HUkWzuD3pE9dEvcLe2wRJAxbr2ORQy9ecfCleD658oYDFPyUni867gy3oAv P4HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019041745 header.b="LBD/HNJF"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 71si10470245pga.319.2019.05.18.03.18.26; Sat, 18 May 2019 03:18:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zytor.com header.s=2019041745 header.b="LBD/HNJF"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729269AbfERItC (ORCPT + 99 others); Sat, 18 May 2019 04:49:02 -0400 Received: from terminus.zytor.com ([198.137.202.136]:46363 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726056AbfERItC (ORCPT ); Sat, 18 May 2019 04:49:02 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x4I8mPjq1731865 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 18 May 2019 01:48:25 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x4I8mPjq1731865 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019041745; t=1558169306; bh=c84VOG927arrQiYWVDPzoCWqjYqqB8ZFryhbVYEK+xo=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=LBD/HNJFffwkOk7oEk5KXuV5uV8WUOACdq5clyLweGLgbE9FlaRYDHryvS4N/YnDw OtF3wYG4WPxtKSS8sndpq7TyUYerEtGDGM/0S3UxUPS2ZWwTb/OkDzLzR0DbqI0DBe kNgiTAFMTOC7M9yC/266hQPEUAYhjdMl+Y4MLtkna6w88O8KqxYOk9oDOeBvNJQFQ9 SYu9ipKBKnAkjqoqMryJb/FA6TaOFJFUjaIAHfIk4Xf3cEDa2z4l+KSClCUG6Z7y/Y sPfKycrJk2OUTGNdtli6V/6lCTi/F6naCD5UxC2Czk7W4ZkGfeO8SgaShrH+6bX6j2 ULhLMWS5hFGsg== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x4I8mOtN1731862; Sat, 18 May 2019 01:48:24 -0700 Date: Sat, 18 May 2019 01:48:24 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Tzvetomir Stoyanov Message-ID: Cc: acme@redhat.com, mingo@kernel.org, rostedt@goodmis.org, tglx@linutronix.de, tstoyanov@vmware.com, jolsa@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org Reply-To: hpa@zytor.com, jolsa@redhat.com, linux-kernel@vger.kernel.org, acme@redhat.com, mingo@kernel.org, tglx@linutronix.de, tstoyanov@vmware.com, rostedt@goodmis.org In-Reply-To: <20190329144546.5819-1-tstoyanov@vmware.com> References: <20190418211556.5a12adc3@oasis.local.home> <20190329144546.5819-1-tstoyanov@vmware.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] tools lib traceevent: Remove hard coded install paths from pkg-config file Git-Commit-ID: 53dbabfe50262eeebb56ce18789c3c885f15e6ac X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 53dbabfe50262eeebb56ce18789c3c885f15e6ac Gitweb: https://git.kernel.org/tip/53dbabfe50262eeebb56ce18789c3c885f15e6ac Author: Tzvetomir Stoyanov AuthorDate: Thu, 18 Apr 2019 21:15:56 -0400 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 15 May 2019 16:36:46 -0300 tools lib traceevent: Remove hard coded install paths from pkg-config file Install directories of header and library files are hard coded in pkg-config template file. They must be configurable, the Makefile should set them on the compilation / install stage. Signed-off-by: Tzvetomir Stoyanov Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190418211556.5a12adc3@oasis.local.home Link: http://lkml.kernel.org/r/20190329144546.5819-1-tstoyanov@vmware.com Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo --- tools/lib/traceevent/Makefile | 13 +++++++++---- tools/lib/traceevent/libtraceevent.pc.template | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile index 941761d9923d..34cf33a4f001 100644 --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile @@ -50,6 +50,9 @@ man_dir = $(prefix)/share/man man_dir_SQ = '$(subst ','\'',$(man_dir))' pkgconfig_dir ?= $(word 1,$(shell $(PKG_CONFIG) \ --variable pc_path pkg-config | tr ":" " ")) +includedir_relative = traceevent +includedir = $(prefix)/include/$(includedir_relative) +includedir_SQ = '$(subst ','\'',$(includedir))' export man_dir man_dir_SQ INSTALL export DESTDIR DESTDIR_SQ @@ -279,6 +282,8 @@ define do_install_pkgconfig_file cp -f ${PKG_CONFIG_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}; \ + sed -i "s|HEADER_DIR|$(includedir)|g" ${PKG_CONFIG_FILE}; \ $(call do_install,$(PKG_CONFIG_FILE),$(pkgconfig_dir),644); \ else \ (echo Failed to locate pkg-config directory) 1>&2; \ @@ -300,10 +305,10 @@ install_pkgconfig: install_headers: $(call QUIET_INSTALL, headers) \ - $(call do_install,event-parse.h,$(prefix)/include/traceevent,644); \ - $(call do_install,event-utils.h,$(prefix)/include/traceevent,644); \ - $(call do_install,trace-seq.h,$(prefix)/include/traceevent,644); \ - $(call do_install,kbuffer.h,$(prefix)/include/traceevent,644) + $(call do_install,event-parse.h,$(DESTDIR)$(includedir_SQ),644); \ + $(call do_install,event-utils.h,$(DESTDIR)$(includedir_SQ),644); \ + $(call do_install,trace-seq.h,$(DESTDIR)$(includedir_SQ),644); \ + $(call do_install,kbuffer.h,$(DESTDIR)$(includedir_SQ),644) install: install_lib diff --git a/tools/lib/traceevent/libtraceevent.pc.template b/tools/lib/traceevent/libtraceevent.pc.template index 42e4d6cb6b9e..86384fcd57f1 100644 --- a/tools/lib/traceevent/libtraceevent.pc.template +++ b/tools/lib/traceevent/libtraceevent.pc.template @@ -1,6 +1,6 @@ prefix=INSTALL_PREFIX -libdir=${prefix}/lib64 -includedir=${prefix}/include/traceevent +libdir=LIB_DIR +includedir=HEADER_DIR Name: libtraceevent URL: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git