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 8F5CC45B7C; Fri, 13 Dec 2024 11:50:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CEDF402F0; Fri, 13 Dec 2024 11:50:56 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id EE8D240273 for ; Fri, 13 Dec 2024 11:50:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734087054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HYH21moeZBQsGSnecrOgnmavKZOzqEOJseUZ4hCvQ4M=; b=SQCTSWVfQ3kUN9+kcNfl3ftQ2h7BuzegdvhRxb/dYCcYTpPd7+YrXWyP1T6lwiennEplta umOZJqLNKi0X1FTb5zllvtO7zzQUzunge8aegfOx8oDJWZvCiJPpCQzvJtvHVkHz6RulQm zdbCpB1sf95xJFf7a0XNZk7LTyzS5d4= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-86-gYiSbJ7NMj6Q7fDPSHr-wA-1; Fri, 13 Dec 2024 05:50:51 -0500 X-MC-Unique: gYiSbJ7NMj6Q7fDPSHr-wA-1 X-Mimecast-MFC-AGG-ID: gYiSbJ7NMj6Q7fDPSHr-wA Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 26D8919560BE; Fri, 13 Dec 2024 10:50:50 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.129]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7FE1D195605A; Fri, 13 Dec 2024 10:50:48 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, Konstantin Ananyev Subject: [PATCH v2 5/6] build: install indirect headers to a dedicated directory Date: Fri, 13 Dec 2024 11:50:09 +0100 Message-ID: <20241213105010.1527683-6-david.marchand@redhat.com> In-Reply-To: <20241213105010.1527683-1-david.marchand@redhat.com> References: <20241127112617.1331125-1-david.marchand@redhat.com> <20241213105010.1527683-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: chZ2W88vKgKqUBd17C1LwsvjH_uIEy-vEDhR05oXUmU_1734087050 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 The headers check currently skips "indirect" headers as instructed via the indirect_headers meson variable. This headers check has some limitation that will be addressed in a next change by inspected all exported headers. However, exported headers lack the information about "indirect" quality. Separate "indirect" headers by exporting them in a internal/ sub directory. This also makes it more obvious which headers are not to be directly used by an application. Signed-off-by: David Marchand --- buildtools/pkg-config/meson.build | 8 +++++++- lib/eal/x86/include/meson.build | 3 ++- lib/meson.build | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build index b36add17e3..b2afca9eec 100644 --- a/buildtools/pkg-config/meson.build +++ b/buildtools/pkg-config/meson.build @@ -27,12 +27,18 @@ endif # are skipped in the case of static linkage thanks to the flag --as-needed. +subdirs = ['.', 'internal'] +if get_option('include_subdir_arch') != '' + subdirs += [get_option('include_subdir_arch')] + subdirs += [join_paths(get_option('include_subdir_arch'), 'internal')] +endif + pkg.generate(name: 'dpdk-libs', filebase: 'libdpdk-libs', description: '''Internal-only DPDK pkgconfig file. Not for direct use. Use libdpdk.pc instead of this file to query DPDK compile/link arguments''', version: meson.project_version(), - subdirs: [get_option('include_subdir_arch'), '.'], + subdirs: subdirs, extra_cflags: pkg_extra_cflags, libraries: ['-Wl,--as-needed'] + dpdk_libraries, libraries_private: dpdk_extra_ldflags) diff --git a/lib/eal/x86/include/meson.build b/lib/eal/x86/include/meson.build index 52d2f8e969..a100330208 100644 --- a/lib/eal/x86/include/meson.build +++ b/lib/eal/x86/include/meson.build @@ -22,5 +22,6 @@ arch_indirect_headers = files( 'rte_byteorder_32.h', 'rte_byteorder_64.h', ) -install_headers(arch_headers + arch_indirect_headers, subdir: get_option('include_subdir_arch')) +install_headers(arch_headers, subdir: get_option('include_subdir_arch')) +install_headers(arch_indirect_headers, subdir: join_paths(get_option('include_subdir_arch'), 'internal')) dpdk_chkinc_headers += arch_headers diff --git a/lib/meson.build b/lib/meson.build index ce92cb5537..78ada7782e 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -202,7 +202,7 @@ foreach l:libraries dpdk_libs_enabled += name dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) install_headers(headers) - install_headers(indirect_headers) + install_headers(indirect_headers, subdir: 'internal') if get_option('enable_driver_sdk') install_headers(driver_sdk_headers) endif -- 2.47.0