From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4DCEDA09E4; Fri, 29 Jan 2021 17:52:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4CCC240123; Fri, 29 Jan 2021 17:52:02 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id DB862240123 for ; Fri, 29 Jan 2021 17:52:00 +0100 (CET) IronPort-SDR: kz8y7y5xRHWESCwV+koP9OHiw9rLjSo+DpNsVzfSbXHlLQuYxwc1Vb+U6nggDlDNB0mQQoSH9A N2l3SsM+unbQ== X-IronPort-AV: E=McAfee;i="6000,8403,9879"; a="167549644" X-IronPort-AV: E=Sophos;i="5.79,386,1602572400"; d="scan'208";a="167549644" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2021 08:51:58 -0800 IronPort-SDR: Yhw03CDtdORHSqYOL9K7uRrd60Ozj+P+1naxtaE3UQric6XFsYBmFkjWvSRpIeH6y7hEyP+67w Spe8ZGqLxd/w== X-IronPort-AV: E=Sophos;i="5.79,386,1602572400"; d="scan'208";a="431087992" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.20.59]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 29 Jan 2021 08:51:52 -0800 Date: Fri, 29 Jan 2021 16:51:48 +0000 From: Bruce Richardson To: Thomas Monjalon Cc: "Burakov, Anatoly" , dev@dpdk.org, Gregory Etelson , Nicolas Chautru , Chas Williams , "Min Hu (Connor)" , Olivier Matz , David Hunt , Harry van Haaren , Marko Kovacevic , Bernard Iremonger , Ori Kam , Konstantin Ananyev , Cristian Dumitrescu , Radu Nicolau , Akhil Goyal , Ferruh Yigit , Tomasz Kantecki , Declan Doherty , Sunil Kumar Kori , Pavan Nikhilesh , Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram , Xiaoyun Li , Jingjing Wu , Reshma Pattan , John McNamara , Kirill Rybalchenko , Jasvinder Singh , Byron Marohn , Yipeng Wang , Robert Sanford , Erik Gabriel Carrillo , Maxime Coquelin , Chenbo Xia Message-ID: <20210129165148.GM929@bricha3-MOBL.ger.corp.intel.com> References: <20210119130324.154030-1-bruce.richardson@intel.com> <85fc72d8-ee34-7b03-6ae4-4ee5a292257e@intel.com> <20210129160538.GL929@bricha3-MOBL.ger.corp.intel.com> <1858218.LOKX5zafly@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1858218.LOKX5zafly@thomas> Subject: Re: [dpdk-dev] [PATCH] examples: warn about broken pkg-config X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Jan 29, 2021 at 05:27:11PM +0100, Thomas Monjalon wrote: > 29/01/2021 17:05, Bruce Richardson: > > On Fri, Jan 29, 2021 at 04:04:18PM +0000, Burakov, Anatoly wrote: > > > On 29-Jan-21 3:55 PM, Bruce Richardson wrote: > > > > On Fri, Jan 29, 2021 at 04:47:35PM +0100, Thomas Monjalon wrote: > > > > > 19/01/2021 14:03, Bruce Richardson: > > > > > > Since the examples are designed to be built by end-users using Make, we > > > > > > can detect and warn about broken pkg-config on the user's system as part > > > > > > of the build process. > > > > > > > > > > > > Signed-off-by: Bruce Richardson > [...] > > > > > > 56 files changed, 455 insertions(+), 3 deletions(-) > > > > > > > > > > That's a lot of duplicated code that may need some extension in future. > > > > > What about having a file examples/common.mk to include? > > > > > With the special syntax -include there will be no error in case > > > > > ../common.mk does not exist. Deal? > > > > > > > > > > ref: https://www.gnu.org/software/make/manual/html_node/Include.html > > > > > > > > > > > > > Yes, and no. There is far more boilerplate already in these files which > > > > needs to be consolidated, so I see little point in just trying to extract > > > > this part out alone. Therefore, what I'd like to see done (if ever someone > > > > has the time) is to extract all the boilerplate out to a common makefile, > > > > but also add a postinstall script to flatten out the makefile on install, > > > > so that each example is once again self-contained. > > > > > > > > I've been thinking about this for a while, just haven't got time for it. > > > > > > > > /Bruce > > > > > > > > > > These makefiles are supposed to be examples. Meaning, it should be possible > > > to just take the example app and compile it as is. That means we can't rely > > > on external makefiles, they're supposed to be self-contained. > > > > > Exactly. Hence the need to "flatten" out the makefiles, by changing the > > include to be the actual contents. > > My proposal is just for pkg-config check, which doesn't serve as an example. > If this check is not there, it still works. > That's what -include is for: include optional stuff which can be missing. > Yes, but given the number of times I've had queries about the static builds being broken on RHEL7, I think it's quite important that this check be there to flag it. Therefore, I'd rather not have it in a common file that could be missed.