From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 25980A0531; Mon, 27 Jan 2020 16:44:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 723781BFDC; Mon, 27 Jan 2020 16:44:27 +0100 (CET) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id 664681BFD7 for ; Mon, 27 Jan 2020 16:44:25 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 2144C514; Mon, 27 Jan 2020 10:44:24 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 27 Jan 2020 10:44:24 -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; s=mesmtp; bh=dcqF5qHPCL HC7Iy91t1SItYcXZTadmujr+mIlwjo2IM=; b=YTp7dkCLHXjuG4j+BDRvTh7xYY CU0KlfFwXj2t9XEo5JpLrWABhZI7hEX4rjjJvfflOdbS0euuEq71dyEHgXORzDt7 8lJ3aaImWrutMDfjI0I8tRoMvHPye4Nhu2yIhEruztSukbxRNeG1XwFOU8iPkPX3 jJNTEo8SSxggM20Os= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=dcqF5qHPCLHC7Iy91t1SItYcXZTadmujr+mIlwjo2IM=; b=Jzh71L/K 0WfrbWofKFlzVDv+k8Q1Z48d9ZN/HsNAtS35IxM8vWN5b0OpZUH2Qo+/sGGx20bu LAuNdh/vJ4do5LIReekGMpv+uWRZ0oPiRwsZ9UxTBRGSTOM5RoSHE2IShr8Ssv65 gEIgr/0KygXZdHuJe5kc5u81wtWvVdGfiNB0UepH/0AlnMzp/zFsv88z7+aCPbes YzPzjkhy4jjaE2aF7tuTt1FZdmL/AM2K6NKjEkYuYrXlkbap56+gi4/q0FQwFM3f qWeEjoV0ZY1Un2ozNrkX50u3prOkMyFvL1OgGsgSlRxj6OiLA7a0WfZNJ2t4XobR /InrDIBxm7xQLg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrfedvgdejkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgepvdenucfrrghr rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth 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 1A1643280063; Mon, 27 Jan 2020 10:44:23 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: bruce.richardson@intel.com, John McNamara , Marko Kovacevic Date: Mon, 27 Jan 2020 16:44:01 +0100 Message-Id: <20200127154402.4008069-4-thomas@monjalon.net> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200127154402.4008069-1-thomas@monjalon.net> References: <20200116071656.1663967-1-thomas@monjalon.net> <20200127154402.4008069-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 3/4] build: allow hiding 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 --- doc/guides/contributing/coding_style.rst | 6 ++++++ drivers/meson.build | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst index 841ef6d5c8..c96457273f 100644 --- a/doc/guides/contributing/coding_style.rst +++ b/doc/guides/contributing/coding_style.rst @@ -975,6 +975,12 @@ deps ext_deps As above. +hidden_deps + **Default Value = []**. + Used to specify external dependencies, same as ``ext_deps``, except + the libraries won't be exposed as requirements of the static driver, + in the section ``Requires.private`` of the generated ``.pc`` file. + includes **Default Value = ** Some drivers include a base directory for additional source files and headers, so we have this diff --git a/drivers/meson.build b/drivers/meson.build index 29708cc2bb..759263c309 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