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 E13F4A09E4; Fri, 29 Jan 2021 17:27:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 598514067B; Fri, 29 Jan 2021 17:27:22 +0100 (CET) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by mails.dpdk.org (Postfix) with ESMTP id AF30A40395 for ; Fri, 29 Jan 2021 17:27:18 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id D7B135807F8; Fri, 29 Jan 2021 11:27:17 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 29 Jan 2021 11:27:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= QLei/FAcgNr5wWA+x2rxS298UHFnMmtUATSFJsZmvyY=; b=UPPcSEoQ6YpIf1EZ hDjJDtxaGcHYCwZfU9HptvaOYzulMN7TsqmD1Emxj4afHbyDfZZ6mpu8boWxHETy SOVdDRJX174mLFx54Nv2mxOYAtJJeymuK8pCGLW1vSYnBT3dAgHb3ao6ss/ynLji zEYykjACm9kZysxOkuffNr8jp0CiOPRhkFgyG9zI4ZJ3zHkmzanEmaL1RoE4u8LH 2fsVcL5g8tamYhaT7I6bL/Bc+Klm9pO39K4ghpqfYY5Yf9841BYiaiwrxCj4zewm Hkc/ch83W5a9r55sdXuVnVqn+HBxQmdXqO2f1UzWRuL74mARGKHDZjiUEr900q5v CMCFog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=QLei/FAcgNr5wWA+x2rxS298UHFnMmtUATSFJsZmv yY=; b=kGzUvvRB/70KTzYxGSXg50XncnFeIvwi9X2x5C+OfDdhp02pBysx4I8BA OGpHURSihdbBQVulUuH6tjKiyDpy0ZzWI8adYOBV3EViehI90oN/kov8TsnJXCYP E3YsUtB2JLXobIbjKf737cATGRHY63t0jJQ7ks3vguCesLU9CrOnNpaw6ewGW5/2 Bef4nshYNN8p0o2QwU679uLhLXGNh6B8aZMOcnV/K7+WQ+aFXEjjuPWj46/NW/+0 ZXRrcVNS6s0L/ZvGs9hhC7S1/wxcLYT+whSiokw7OmLkg2JUu0yGiV5FHtXAudAa 4rmyWtdBgb0QJXeV5K1Sqgl/ReHwA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedvgdeklecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpeettefguefgkefgieevleejjeelvedvjedvveekueekheefvddvkeff tdffheetudenucffohhmrghinhepvgigihhsthdruggvrghlpdhgnhhurdhorhhgnecukf hppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 71E3824005D; Fri, 29 Jan 2021 11:27:13 -0500 (EST) From: Thomas Monjalon To: "Burakov, Anatoly" , Bruce Richardson Cc: 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 Date: Fri, 29 Jan 2021 17:27:11 +0100 Message-ID: <1858218.LOKX5zafly@thomas> In-Reply-To: <20210129160538.GL929@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> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 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.