From patchwork Thu Jan 16 07:16:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 64752 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AD8CDA04F9; Thu, 16 Jan 2020 08:17:23 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 560B71C066; Thu, 16 Jan 2020 08:17:15 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 59E0E1C020 for ; Thu, 16 Jan 2020 08:17:13 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 03463220C9; Thu, 16 Jan 2020 02:17:12 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 16 Jan 2020 02:17:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=zhuDxfyIXD prTZjE+NROPLRsEuPXjg6R0IfN0YZoofA=; b=r4REsDVxtucYEcYhbPuOM9MsB7 Toc8+fe8ihur3LWo4Hm6orj0ntii6Ym9hVs89+LKpethViTuaCsM0gkROYAZd2v/ OTKUlOolE/6FPYdd3raTUhH68RwaL5A8cUBX35Jp2uFjwaaaDIHZDTJDcIAOi45a 6Nu7N7BE76UX8mcP0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding: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=zhuDxfyIXDprTZjE+NROPLRsEuPXjg6R0IfN0YZoofA=; b=DMcE+7Bc ZREoQ9cPiURDs4jJmXB8y7F/GI0b7Gs9Qw/PHGRQwwYwUIjhM2Pd1ulQmR9y/du1 h1N5Wbmfa9O9MBlSQZPFk6edKYWTvrRFrcn3yhqcnHp2DldQ7ybZouAtBaeLChjU WKbSOBEba/IPOL97HaYixBATmJl2dYn5KlWicqOyD2LzrAJTa9VD9juzmyj+Zg3X 7CMaWTh9Qjfnk87tqelR2YM24wsVIF/c0KwRDb+qSFRGe0Gar/AYKVleAClXv/hp CjaaX/Wr511ejEhbZSPu6CglsW5gu5SPlt6BEAlLc1OW7DknT6hFcVo4BqPeiUVP xlenxnv04TOcQQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrtdeggddutddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtdefrddukeegnecurf grrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtnecu vehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 896DC30607BE for ; Thu, 16 Jan 2020 02:17:11 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Date: Thu, 16 Jan 2020 08:16:55 +0100 Message-Id: <20200116071656.1663967-3-thomas@monjalon.net> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200116071656.1663967-1-thomas@monjalon.net> References: <20200116071656.1663967-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/3] build: allow to hide dependencies from pkg-config X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" If a dependency is required for a driver build, but should not be exposed to the application (via pkg-config), it can be declared in the array hidden_deps. The hidden_deps are used as internal dependencies, when building the shared library and the first stage of static library. The final static library does not include the hidden_deps because this library object is used to generate the .pc file. Signed-off-by: Thomas Monjalon --- drivers/meson.build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/meson.build b/drivers/meson.build index 3f8749d0b7..4ecd17ee01 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -56,6 +56,7 @@ foreach class:dpdk_driver_classes # too, so that it can be reflected in the pkgconfig output for # static builds. ext_deps = [] + hidden_deps = [] pkgconfig_extra_libs = [] # pull in driver directory which should assign to each of the above @@ -71,8 +72,9 @@ foreach class:dpdk_driver_classes endforeach if build # get dependency objs from strings - shared_deps = ext_deps - static_deps = ext_deps + shared_deps = ext_deps + hidden_deps + static_deps = ext_deps + hidden_deps + static_pub_deps = ext_deps foreach d:deps if not is_variable('shared_rte_' + d) build = false @@ -82,6 +84,7 @@ foreach class:dpdk_driver_classes else shared_deps += [get_variable('shared_rte_' + d)] static_deps += [get_variable('static_rte_' + d)] + static_pub_deps += [get_variable('static_rte_' + d)] endif endforeach endif @@ -144,7 +147,7 @@ foreach class:dpdk_driver_classes sources, objects: objs, include_directories: includes, - dependencies: static_deps, + dependencies: static_pub_deps, # skip hidden_deps c_args: cflags, install: true)