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 008ACA0548; Thu, 4 Nov 2021 09:59:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5F7B40E5A; Thu, 4 Nov 2021 09:59:26 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id D9C9940DFD for ; Thu, 4 Nov 2021 09:59:24 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10157"; a="317872372" X-IronPort-AV: E=Sophos;i="5.87,208,1631602800"; d="scan'208";a="317872372" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2021 01:59:23 -0700 X-IronPort-AV: E=Sophos;i="5.87,208,1631602800"; d="scan'208";a="667816321" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.3.250]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 04 Nov 2021 01:59:22 -0700 Date: Thu, 4 Nov 2021 08:59:19 +0000 From: Bruce Richardson To: Stephen Hemminger Cc: dev@dpdk.org Message-ID: References: <20211103221205.63175-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211103221205.63175-1-stephen@networkplumber.org> Subject: Re: [dpdk-dev] [RFC] build: allow build DPDK as a meson submodule 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 Wed, Nov 03, 2021 at 03:12:05PM -0700, Stephen Hemminger wrote: > Some other projects using meson may not be able to use DPDK > using the standard distribution pkg-config mechanism. > Meson supports a way to handle this via the subproject > https://mesonbuild.com/Subprojects.html > > This patch adds the necessary depedency to follow the > "Naming convention for depedency variables" from the documentation. > It has no impact if subproject is not being used. > > Signed-off-by: Stephen Hemminger Thanks for this Stephen. Couple of comments inline below. /Bruce > --- > meson.build | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/meson.build b/meson.build > index 12cb6e0e83f3..6ce5eda2779f 100644 > --- a/meson.build > +++ b/meson.build > @@ -97,6 +97,16 @@ configure_file(output: build_cfg, > # build pkg-config files for dpdk > subdir('buildtools/pkg-config') > > +# If DPDK is being built as subproject then define > +# varialble with the dependency convention > +if meson.is_subproject() I wonder if we should just omit this check. Defining the extra variable in case of non-subproject should just be harmless. > + libdpdk_dep = declare_dependency( > + version: meson.project_version(), > + compile_args : pkg_extra_cflags, > + dependencies: shared_deps > + ) "shared_deps" is almost certainly not the correct variable to use here without additional changes to guarantee its value. That variable is used in lib and driver meson.build files to hold the libraries to link for each shared object, so at this point in the build, it will likely contain only the dependencies of the final driver built, rather than all the DPDK libraries. I think it would be safer to define "dpdk_shared_deps" global variable at the top of this meson.build file and add to that from lib/meson.build as each library dependency is defined. > +endif > +