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 1498FA09E4; Fri, 29 Jan 2021 17:04:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD7284067D; Fri, 29 Jan 2021 17:04:33 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id AB17640395 for ; Fri, 29 Jan 2021 17:04:30 +0100 (CET) IronPort-SDR: easXYydq0+3W+iYCGB7Nnn8IFamsaPHHWIKsJue21CUcFQ6JikXVhsW+cDRNyWRvJOJxhb4Noy Xf9xi5wM55CA== X-IronPort-AV: E=McAfee;i="6000,8403,9878"; a="180517682" X-IronPort-AV: E=Sophos;i="5.79,385,1602572400"; d="scan'208";a="180517682" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2021 08:04:29 -0800 IronPort-SDR: 37+igwuXe0V8dJzqf3ZjSLrJTIF4t+r4PvzvuA503J8hkB+SIJ+QbM+oHAuHQp0plr1K4ym7h5 hDrIEF75Atlw== X-IronPort-AV: E=Sophos;i="5.79,385,1602572400"; d="scan'208";a="365316444" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.210.186]) ([10.213.210.186]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2021 08:04:21 -0800 To: Bruce Richardson , Thomas Monjalon 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 References: <20210119130324.154030-1-bruce.richardson@intel.com> <6153571.i5FVJI79gW@thomas> <20210129155511.GK929@bricha3-MOBL.ger.corp.intel.com> From: "Burakov, Anatoly" Message-ID: <85fc72d8-ee34-7b03-6ae4-4ee5a292257e@intel.com> Date: Fri, 29 Jan 2021 16:04:18 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20210129155511.GK929@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 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 >>> --- >>> examples/bbdev_app/Makefile | 8 ++++++++ >>> examples/bond/Makefile | 8 ++++++++ >>> examples/cmdline/Makefile | 8 ++++++++ >>> examples/distributor/Makefile | 8 ++++++++ >>> examples/ethtool/ethtool-app/Makefile | 8 ++++++++ >>> examples/eventdev_pipeline/Makefile | 8 ++++++++ >>> examples/fips_validation/Makefile | 8 ++++++++ >>> examples/flow_classify/Makefile | 8 ++++++++ >>> examples/flow_filtering/Makefile | 8 ++++++++ >>> examples/helloworld/Makefile | 8 ++++++++ >>> examples/ioat/Makefile | 8 ++++++++ >>> examples/ip_fragmentation/Makefile | 11 ++++++++++- >>> examples/ip_pipeline/Makefile | 8 ++++++++ >>> examples/ip_reassembly/Makefile | 8 ++++++++ >>> examples/ipsec-secgw/Makefile | 8 ++++++++ >>> examples/ipv4_multicast/Makefile | 8 ++++++++ >>> examples/kni/Makefile | 8 ++++++++ >>> examples/l2fwd-cat/Makefile | 8 ++++++++ >>> examples/l2fwd-crypto/Makefile | 8 ++++++++ >>> examples/l2fwd-event/Makefile | 8 ++++++++ >>> examples/l2fwd-jobstats/Makefile | 8 ++++++++ >>> examples/l2fwd-keepalive/Makefile | 8 ++++++++ >>> examples/l2fwd-keepalive/ka-agent/Makefile | 8 ++++++++ >>> examples/l2fwd/Makefile | 8 ++++++++ >>> examples/l3fwd-acl/Makefile | 8 ++++++++ >>> examples/l3fwd-graph/Makefile | 12 +++++++++++- >>> examples/l3fwd-power/Makefile | 8 ++++++++ >>> examples/l3fwd/Makefile | 8 ++++++++ >>> examples/link_status_interrupt/Makefile | 8 ++++++++ >>> .../client_server_mp/mp_client/Makefile | 8 ++++++++ >>> .../client_server_mp/mp_server/Makefile | 8 ++++++++ >>> examples/multi_process/hotplug_mp/Makefile | 8 ++++++++ >>> examples/multi_process/simple_mp/Makefile | 8 ++++++++ >>> examples/multi_process/symmetric_mp/Makefile | 8 ++++++++ >>> examples/ntb/Makefile | 11 ++++++++++- >>> examples/packet_ordering/Makefile | 8 ++++++++ >>> examples/performance-thread/l3fwd-thread/Makefile | 8 ++++++++ >>> examples/performance-thread/pthread_shim/Makefile | 8 ++++++++ >>> examples/pipeline/Makefile | 8 ++++++++ >>> examples/ptpclient/Makefile | 8 ++++++++ >>> examples/qos_meter/Makefile | 8 ++++++++ >>> examples/qos_sched/Makefile | 8 ++++++++ >>> examples/rxtx_callbacks/Makefile | 8 ++++++++ >>> examples/server_node_efd/node/Makefile | 8 ++++++++ >>> examples/server_node_efd/server/Makefile | 8 ++++++++ >>> examples/service_cores/Makefile | 8 ++++++++ >>> examples/skeleton/Makefile | 8 ++++++++ >>> examples/timer/Makefile | 8 ++++++++ >>> examples/vdpa/Makefile | 8 ++++++++ >>> examples/vhost/Makefile | 8 ++++++++ >>> examples/vhost_blk/Makefile | 8 ++++++++ >>> examples/vhost_crypto/Makefile | 8 ++++++++ >>> examples/vm_power_manager/Makefile | 8 ++++++++ >>> examples/vm_power_manager/guest_cli/Makefile | 8 ++++++++ >>> examples/vmdq/Makefile | 8 ++++++++ >>> examples/vmdq_dcb/Makefile | 8 ++++++++ >>> 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. -- Thanks, Anatoly