From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22BEAC33CB1 for ; Thu, 16 Jan 2020 07:17:24 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id ADD5F20748 for ; Thu, 16 Jan 2020 07:17:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=monjalon.net header.i=@monjalon.net header.b="r4REsDVx"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="DMcE+7Bc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADD5F20748 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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 Content-Transfer-Encoding: 8bit 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) -- 2.24.1